summary refs log tree commit diff
path: root/synapse/streams
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <paul@matrix.org>2014-08-29 19:13:55 +0100
committerPaul "LeoNerd" Evans <paul@matrix.org>2014-08-29 19:13:55 +0100
commiteec67a675f7ea3545bfba79c6b753f63f7fd9b3b (patch)
tree3f21a7efafb131bd76848cdc50ce574edb95fd2f /synapse/streams
parentBugfix for rest presence test - datastore needs to implement profile methods (diff)
downloadsynapse-eec67a675f7ea3545bfba79c6b753f63f7fd9b3b.tar.xz
Have EventSource's get_new_events_for_user() API work only on keys within that source, not overall eventstream tokens
Diffstat (limited to 'synapse/streams')
-rw-r--r--synapse/streams/events.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/synapse/streams/events.py b/synapse/streams/events.py
index 8480368673..43b6b1eba3 100644
--- a/synapse/streams/events.py
+++ b/synapse/streams/events.py
@@ -28,8 +28,8 @@ class NullSource(object):
     def __init__(self, hs):
         pass
 
-    def get_new_events_for_user(self, user, from_token, limit):
-        return defer.succeed(([], from_token))
+    def get_new_events_for_user(self, user, from_key, limit):
+        return defer.succeed(([], from_key))
 
     def get_current_token_part(self):
         return defer.succeed(0)
@@ -68,7 +68,8 @@ class EventSources(object):
 
 
 class StreamSource(object):
-    def get_new_events_for_user(self, user, from_token, limit):
+    def get_new_events_for_user(self, user, from_key, limit):
+        """from_key is the key within this event source."""
         raise NotImplementedError("get_new_events_for_user")
 
     def get_current_token_part(self):