summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/events.py13
-rw-r--r--synapse/handlers/presence.py4
-rw-r--r--synapse/handlers/room.py4
3 files changed, 14 insertions, 7 deletions
diff --git a/synapse/handlers/events.py b/synapse/handlers/events.py
index 2d7bd5083b..8c34776245 100644
--- a/synapse/handlers/events.py
+++ b/synapse/handlers/events.py
@@ -15,6 +15,8 @@
 
 from twisted.internet import defer
 
+from synapse.api.events import SynapseEvent
+
 from ._base import BaseHandler
 
 import logging
@@ -50,10 +52,15 @@ class EventStreamHandler(BaseHandler):
 
         events, tokens = yield self.notifier.get_events_for(auth_user, pagin_config, timeout)
 
+        chunks = [
+            e.get_dict() if isinstance(e, SynapseEvent) else e
+            for e in events
+        ]
+
         chunk = {
-            "chunk": [e.get_dict() for e in events],
-            "start_token": tokens[0].to_string(),
-            "end_token": tokens[1].to_string(),
+            "chunk": chunks,
+            "start": tokens[0].to_string(),
+            "end": tokens[1].to_string(),
         }
 
         defer.returnValue(chunk)
diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py
index 30d6269e2e..8408266da0 100644
--- a/synapse/handlers/presence.py
+++ b/synapse/handlers/presence.py
@@ -142,7 +142,7 @@ class PresenceHandler(BaseHandler):
     @defer.inlineCallbacks
     def is_presence_visible(self, observer_user, observed_user):
         defer.returnValue(True)
-        return
+        #return
         # FIXME (erikj): This code path absolutely kills the database.
 
         assert(observed_user.is_mine)
@@ -189,7 +189,7 @@ class PresenceHandler(BaseHandler):
 
     @defer.inlineCallbacks
     def set_state(self, target_user, auth_user, state):
-        return
+        # return
         # TODO (erikj): Turn this back on. Why did we end up sending EDUs
         # everywhere?
 
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py
index 20b4bbb665..6fbe84ea40 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -126,8 +126,8 @@ class MessageHandler(BaseHandler):
 
         chunk = {
             "chunk": [e.get_dict() for e in events],
-            "start_token": from_token.to_string(),
-            "end_token": next_token.to_string(),
+            "start": from_token.to_string(),
+            "end": next_token.to_string(),
         }
 
         defer.returnValue(chunk)