diff options
author | Mark Haines <mark.haines@matrix.org> | 2015-10-21 15:45:37 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2015-10-21 15:45:37 +0100 |
commit | d63a0ca34b0951cb3d1981225e1c1cf91b996d30 (patch) | |
tree | f2931ff9c810914e4a22eb774642aadf431dd41f | |
parent | Include typing events in initial v2 sync (diff) | |
download | synapse-d63a0ca34b0951cb3d1981225e1c1cf91b996d30.tar.xz |
Doc string for the SyncHandler.typing_by_room method
Diffstat (limited to '')
-rw-r--r-- | synapse/handlers/sync.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py index e22fe553fd..e651b49987 100644 --- a/synapse/handlers/sync.py +++ b/synapse/handlers/sync.py @@ -211,6 +211,18 @@ class SyncHandler(BaseHandler): @defer.inlineCallbacks def typing_by_room(self, sync_config, now_token, since_token=None): + """Get the typing events for each room the user is in + Args: + sync_config (SyncConfig): The flags, filters and user for the sync. + now_token (StreamToken): Where the server is currently up to. + since_token (StreamToken): Where the server was when the client + last synced. + Returns: + A tuple of the now StreamToken, updated to reflect the which typing + events are included, and a dict mapping from room_id to a list of + typing events for that room. + """ + typing_key = since_token.typing_key if since_token else "0" typing_source = self.event_sources.sources["typing"] |