summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-10-28 14:05:50 +0000
committerErik Johnston <erik@matrix.org>2015-10-28 14:05:50 +0000
commit56dbcd1524d855e0bea2a77e371b1732f82a9492 (patch)
treeea04c29e90a9335f6a4bfa199e9f4b4adfdc9ded /synapse/handlers
parentAdd room context api (diff)
downloadsynapse-56dbcd1524d855e0bea2a77e371b1732f82a9492.tar.xz
Docs
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/room.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py
index dd93a5d04d..36878a6c20 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -751,6 +751,19 @@ class RoomListHandler(BaseHandler):
 class RoomContextHandler(BaseHandler):
     @defer.inlineCallbacks
     def get_event_context(self, user, room_id, event_id, limit):
+        """Retrieves events, pagination tokens and state around a given event
+        in a room.
+
+        Args:
+            user (UserID)
+            room_id (str)
+            event_id (str)
+            limit (int): The maximum number of events to return in total
+                (excluding state).
+
+        Returns:
+            dict
+        """
         before_limit = math.floor(limit/2.)
         after_limit = limit - before_limit