summary refs log tree commit diff
path: root/synapse/notifier.py
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2023-01-25 16:34:37 -0500
committerGitHub <noreply@github.com>2023-01-25 21:34:37 +0000
commit7e8d455280b58dbda3ff24b19dbffad2d6c6c253 (patch)
treec7760cdcfdea711c5fa53b6efe051904193177ca /synapse/notifier.py
parentAdd missing type hints for tests.events. (#14904) (diff)
downloadsynapse-7e8d455280b58dbda3ff24b19dbffad2d6c6c253.tar.xz
Fix a bug in the send_local_online_presence_to module API (#14880)
Destination was being used incorrectly (a single destination instead
of a list of destinations was being passed).

This also updates some of the types in the area to not use Collection[str],
which is a footgun.
Diffstat (limited to 'synapse/notifier.py')
-rw-r--r--synapse/notifier.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/notifier.py b/synapse/notifier.py
index 2b0e52f23c..a8832a3f8e 100644
--- a/synapse/notifier.py
+++ b/synapse/notifier.py
@@ -46,6 +46,7 @@ from synapse.types import (
     JsonDict,
     PersistedEventPosition,
     RoomStreamToken,
+    StrCollection,
     StreamKeyType,
     StreamToken,
     UserID,
@@ -716,7 +717,7 @@ class Notifier:
 
     async def _get_room_ids(
         self, user: UserID, explicit_room_id: Optional[str]
-    ) -> Tuple[Collection[str], bool]:
+    ) -> Tuple[StrCollection, bool]:
         joined_room_ids = await self.store.get_rooms_for_user(user.to_string())
         if explicit_room_id:
             if explicit_room_id in joined_room_ids: