summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2021-02-15 17:33:35 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2021-02-15 17:33:35 +0000
commit32e41cc8e005e60e12d4541b1a8bc126484aac55 (patch)
treee674469ba4b17b0cd2fe51b0f761c63df3b65bc2
parentFix server name typo (diff)
downloadsynapse-32e41cc8e005e60e12d4541b1a8bc126484aac55.tar.xz
Add instead of update requesting user_id to set; invalidate cache context
We were set.update'ing a user_id, instead of set.add. The former treats
user_id as an iterable, and thus adds every individual letter of the
requesting user to the set. Fun!
-rw-r--r--synapse/handlers/presence.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py
index afd527ba3f..a1a4a306dc 100644
--- a/synapse/handlers/presence.py
+++ b/synapse/handlers/presence.py
@@ -1114,9 +1114,9 @@ class PresenceEventSource:
         user_id = user.to_string()
 
         users_interested_in = await self.store.get_users_who_share_room_with_user(
-            user_id,
+            user_id, on_invalidate=cache_context.invalidate
         )
-        users_interested_in.update(user_id)  # So that we receive our own presence
+        users_interested_in.add(user_id)  # So that we receive our own presence
 
         if explicit_room_id:
             user_ids = await self.store.get_users_in_room(