summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-03-15 14:50:33 +0000
committerErik Johnston <erik@matrix.org>2017-03-15 15:01:39 +0000
commite892457a03787e844ba291acc9bfa9455e854145 (patch)
treefe65d5d19df09f452e6f061c2ec26e5adec91c0c /synapse/handlers
parentRemove unused import (diff)
downloadsynapse-e892457a03787e844ba291acc9bfa9455e854145.tar.xz
Comment
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/presence.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py
index 46704c62a0..f714bcb53d 100644
--- a/synapse/handlers/presence.py
+++ b/synapse/handlers/presence.py
@@ -984,6 +984,9 @@ def should_notify(old_state, new_state):
 def format_user_presence_state(state, now, include_user_id=True):
     """Convert UserPresenceState to a format that can be sent down to clients
     and to other servers.
+
+    The "user_id" is optional so that this function can be used to format presence
+    updates for client /sync responses and for federation /send requests.
     """
     content = {
         "presence": state.state,