summary refs log tree commit diff
diff options
context:
space:
mode:
authorreivilibre <oliverw@matrix.org>2021-09-30 11:06:47 +0100
committerGitHub <noreply@github.com>2021-09-30 11:06:47 +0100
commita03ed5e6ae23e52941e91ecb892a7b5c88964d90 (patch)
tree296b98695e75033095cda928846c3cc7c2577086
parentUpdate installation instructions (#10919) (diff)
downloadsynapse-a03ed5e6ae23e52941e91ecb892a7b5c88964d90.tar.xz
Fix issue causing sending presence to ASes to fail (due to incomplete type annotations) (#10944)
-rw-r--r--changelog.d/10944.bugfix1
-rw-r--r--synapse/handlers/presence.py4
2 files changed, 4 insertions, 1 deletions
diff --git a/changelog.d/10944.bugfix b/changelog.d/10944.bugfix
new file mode 100644
index 0000000000..49baff7df1
--- /dev/null
+++ b/changelog.d/10944.bugfix
@@ -0,0 +1 @@
+Fix a bug introduced in v1.44.0rc1 which prevented sending presence events to application services.
diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py
index 983c837c66..404afb9402 100644
--- a/synapse/handlers/presence.py
+++ b/synapse/handlers/presence.py
@@ -52,6 +52,7 @@ import synapse.metrics
 from synapse.api.constants import EventTypes, Membership, PresenceState
 from synapse.api.errors import SynapseError
 from synapse.api.presence import UserPresenceState
+from synapse.appservice import ApplicationService
 from synapse.events.presence_router import PresenceRouter
 from synapse.logging.context import run_in_background
 from synapse.logging.utils import log_function
@@ -1521,10 +1522,11 @@ class PresenceEventSource(EventSource[int, UserPresenceState]):
         user: UserID,
         from_key: Optional[int],
         limit: Optional[int] = None,
-        room_ids: Optional[List[str]] = None,
+        room_ids: Optional[Collection[str]] = None,
         is_guest: bool = False,
         explicit_room_id: Optional[str] = None,
         include_offline: bool = True,
+        service: Optional[ApplicationService] = None,
     ) -> Tuple[List[UserPresenceState], int]:
         # The process for getting presence events are:
         #  1. Get the rooms the user is in.