Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maunium
synapse
Commits
d63a0ca3
Commit
d63a0ca3
authored
9 years ago
by
Mark Haines
Browse files
Options
Downloads
Patches
Plain Diff
Doc string for the SyncHandler.typing_by_room method
parent
7be06680
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/handlers/sync.py
+12
-0
12 additions, 0 deletions
synapse/handlers/sync.py
with
12 additions
and
0 deletions
synapse/handlers/sync.py
+
12
−
0
View file @
d63a0ca3
...
@@ -211,6 +211,18 @@ class SyncHandler(BaseHandler):
...
@@ -211,6 +211,18 @@ class SyncHandler(BaseHandler):
@defer.inlineCallbacks
@defer.inlineCallbacks
def
typing_by_room
(
self
,
sync_config
,
now_token
,
since_token
=
None
):
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_key
=
since_token
.
typing_key
if
since_token
else
"
0
"
typing_source
=
self
.
event_sources
.
sources
[
"
typing
"
]
typing_source
=
self
.
event_sources
.
sources
[
"
typing
"
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment