aboutsummaryrefslogtreecommitdiff
path: root/internal/pushrules/evaluate.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/pushrules/evaluate.go')
-rw-r--r--internal/pushrules/evaluate.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/internal/pushrules/evaluate.go b/internal/pushrules/evaluate.go
index 28dea97c..6baef434 100644
--- a/internal/pushrules/evaluate.go
+++ b/internal/pushrules/evaluate.go
@@ -111,15 +111,11 @@ func ruleMatches(rule *Rule, kind Kind, event gomatrixserverlib.PDU, ec Evaluati
return patternMatches("content.body", *rule.Pattern, event)
case RoomKind:
- return rule.RuleID == event.RoomID(), nil
+ return rule.RuleID == event.RoomID().String(), nil
case SenderKind:
userID := ""
- validRoomID, err := spec.NewRoomID(event.RoomID())
- if err != nil {
- return false, err
- }
- sender, err := userIDForSender(*validRoomID, event.SenderID())
+ sender, err := userIDForSender(event.RoomID(), event.SenderID())
if err == nil {
userID = sender.String()
}