summary refs log tree commit diff
path: root/synapse/streams
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/streams
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/streams')
-rw-r--r--synapse/streams/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/streams/__init__.py b/synapse/streams/__init__.py
index 2dcd43d0a2..c6c8a0315c 100644
--- a/synapse/streams/__init__.py
+++ b/synapse/streams/__init__.py
@@ -12,9 +12,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from typing import Collection, Generic, List, Optional, Tuple, TypeVar
+from typing import Generic, List, Optional, Tuple, TypeVar
 
-from synapse.types import UserID
+from synapse.types import StrCollection, UserID
 
 # The key, this is either a stream token or int.
 K = TypeVar("K")
@@ -28,7 +28,7 @@ class EventSource(Generic[K, R]):
         user: UserID,
         from_key: K,
         limit: int,
-        room_ids: Collection[str],
+        room_ids: StrCollection,
         is_guest: bool,
         explicit_room_id: Optional[str] = None,
     ) -> Tuple[List[R], K]: