Tweak IsSharedUser some more

This commit is contained in:
Neil Alexander 2022-04-06 12:40:01 +01:00
parent e6f72a8870
commit 3c73ec6b9f
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -259,9 +259,10 @@ func (n *Notifier) SharedUsers(userID string) (sharedUsers []string) {
}
func (n *Notifier) IsSharedUser(userA, userB string) bool {
var okA, okB bool
for _, users := range n.roomIDToJoinedUsers {
_, okA := users[userA]
_, okB := users[userB]
_, okA = users[userA]
_, okB = users[userB]
if okA && okB {
return true
}