diff options
author | Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> | 2021-10-21 17:42:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-21 17:42:25 +0100 |
commit | 6408372234eef2d72a13ee838c07199751c56378 (patch) | |
tree | 494d4e8582c1c4b3d532f2d7e76ce0ab96780d12 /synapse/handlers/typing.py | |
parent | Add missing type hints to synapse.crypto. (#11146) (diff) | |
download | synapse-6408372234eef2d72a13ee838c07199751c56378.tar.xz |
Improve docstrings for methods related to sending EDUs to application services (#11138)
Diffstat (limited to 'synapse/handlers/typing.py')
-rw-r--r-- | synapse/handlers/typing.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/synapse/handlers/typing.py b/synapse/handlers/typing.py index d10e9b8ec4..c411d69924 100644 --- a/synapse/handlers/typing.py +++ b/synapse/handlers/typing.py @@ -465,17 +465,23 @@ class TypingNotificationEventSource(EventSource[int, JsonDict]): may be interested in. Args: - from_key: the stream position at which events should be fetched from - service: The appservice which may be interested + from_key: the stream position at which events should be fetched from. + service: The appservice which may be interested. + + Returns: + A two-tuple containing the following: + * A list of json dictionaries derived from typing events that the + appservice may be interested in. + * The latest known room serial. """ with Measure(self.clock, "typing.get_new_events_as"): - from_key = int(from_key) handler = self.get_typing_handler() events = [] for room_id in handler._room_serials.keys(): if handler._room_serials[room_id] <= from_key: continue + if not await service.matches_user_in_member_list( room_id, handler.store ): |