From 3c73ec6b9feed626507145e8c78e0ec486a16192 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Wed, 6 Apr 2022 12:40:01 +0100 Subject: [PATCH] Tweak `IsSharedUser` some more --- syncapi/notifier/notifier.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/syncapi/notifier/notifier.go b/syncapi/notifier/notifier.go index 592c91b01..a06d6bf2e 100644 --- a/syncapi/notifier/notifier.go +++ b/syncapi/notifier/notifier.go @@ -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 }