summary refs log tree commit diff
path: root/synapse/storage
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/storage
parentAdd room context api (diff)
downloadsynapse-56dbcd1524d855e0bea2a77e371b1732f82a9492.tar.xz
Docs
Diffstat (limited to '')
-rw-r--r--synapse/storage/stream.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/synapse/storage/stream.py b/synapse/storage/stream.py
index f2eecf52f9..15d4c2bf68 100644
--- a/synapse/storage/stream.py
+++ b/synapse/storage/stream.py
@@ -439,6 +439,19 @@ class StreamStore(SQLBaseStore):
 
     @defer.inlineCallbacks
     def get_events_around(self, room_id, event_id, before_limit, after_limit):
+        """Retrieve events and pagination tokens around a given event in a
+        room.
+
+        Args:
+            room_id (str)
+            event_id (str)
+            before_limit (int)
+            after_limit (int)
+
+        Returns:
+            dict
+        """
+
         results = yield self.runInteraction(
             "get_events_around", self._get_events_around_txn,
             room_id, event_id, before_limit, after_limit
@@ -462,6 +475,19 @@ class StreamStore(SQLBaseStore):
         })
 
     def _get_events_around_txn(self, txn, room_id, event_id, before_limit, after_limit):
+        """Retrieves event_ids and pagination tokens around a given event in a
+        room.
+
+        Args:
+            room_id (str)
+            event_id (str)
+            before_limit (int)
+            after_limit (int)
+
+        Returns:
+            dict
+        """
+
         results = self._simple_select_one_txn(
             txn,
             "events",