diff --git a/syncapi/notifier/notifier.go b/syncapi/notifier/notifier.go index c78347827..e66109b9c 100644 --- a/syncapi/notifier/notifier.go +++ b/syncapi/notifier/notifier.go @@ -224,26 +224,13 @@ func (n *Notifier) OnNewPresence( defer n.streamLock.Unlock() var wakeUserIDs []string - _, wantDomain, err := gomatrixserverlib.SplitID('@', userID) - if err != nil { - return - } - // determine if users share a room and needs to be woken up for _, users := range n.roomIDToJoinedUsers { // user sending presence is not in room if !users[userID] { continue } - // check all users in room - for user := range users { - _, domain, err := gomatrixserverlib.SplitID('@', user) - if err != nil { - return - } - if domain == wantDomain { - wakeUserIDs = append(wakeUserIDs, user) - } - } + + wakeUserIDs = append(wakeUserIDs, users.values()...) } n.currPos.ApplyUpdates(posUpdate)