mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Fix issue causing sending presence to ASes to fail (due to incomplete type annotations) (#10944)
This commit is contained in:
parent
e32b9f44ee
commit
a03ed5e6ae
1
changelog.d/10944.bugfix
Normal file
1
changelog.d/10944.bugfix
Normal file
@ -0,0 +1 @@
|
|||||||
|
Fix a bug introduced in v1.44.0rc1 which prevented sending presence events to application services.
|
@ -52,6 +52,7 @@ import synapse.metrics
|
|||||||
from synapse.api.constants import EventTypes, Membership, PresenceState
|
from synapse.api.constants import EventTypes, Membership, PresenceState
|
||||||
from synapse.api.errors import SynapseError
|
from synapse.api.errors import SynapseError
|
||||||
from synapse.api.presence import UserPresenceState
|
from synapse.api.presence import UserPresenceState
|
||||||
|
from synapse.appservice import ApplicationService
|
||||||
from synapse.events.presence_router import PresenceRouter
|
from synapse.events.presence_router import PresenceRouter
|
||||||
from synapse.logging.context import run_in_background
|
from synapse.logging.context import run_in_background
|
||||||
from synapse.logging.utils import log_function
|
from synapse.logging.utils import log_function
|
||||||
@ -1521,10 +1522,11 @@ class PresenceEventSource(EventSource[int, UserPresenceState]):
|
|||||||
user: UserID,
|
user: UserID,
|
||||||
from_key: Optional[int],
|
from_key: Optional[int],
|
||||||
limit: Optional[int] = None,
|
limit: Optional[int] = None,
|
||||||
room_ids: Optional[List[str]] = None,
|
room_ids: Optional[Collection[str]] = None,
|
||||||
is_guest: bool = False,
|
is_guest: bool = False,
|
||||||
explicit_room_id: Optional[str] = None,
|
explicit_room_id: Optional[str] = None,
|
||||||
include_offline: bool = True,
|
include_offline: bool = True,
|
||||||
|
service: Optional[ApplicationService] = None,
|
||||||
) -> Tuple[List[UserPresenceState], int]:
|
) -> Tuple[List[UserPresenceState], int]:
|
||||||
# The process for getting presence events are:
|
# The process for getting presence events are:
|
||||||
# 1. Get the rooms the user is in.
|
# 1. Get the rooms the user is in.
|
||||||
|
Loading…
Reference in New Issue
Block a user