Update syncapi/notifier/notifier.go

Co-authored-by: Till <2353100+S7evinK@users.noreply.github.com>
This commit is contained in:
Neil Alexander 2022-04-13 11:43:53 +01:00 committed by GitHub
parent 24ecde445b
commit e0cdb95eb6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -283,6 +283,9 @@ func (n *Notifier) IsSharedUser(userA, userB string) bool {
var okA, okB bool var okA, okB bool
for _, users := range n.roomIDToJoinedUsers { for _, users := range n.roomIDToJoinedUsers {
okA = users.isIn(userA) okA = users.isIn(userA)
if !okA {
continue
}
okB = users.isIn(userB) okB = users.isIn(userB)
if okA && okB { if okA && okB {
return true return true