1
0

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!
This commit is contained in:
Andrew Morgan
2021-02-15 17:33:35 +00:00
parent 27b0a44a18
commit 32e41cc8e0

View File

@@ -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(