summary refs log tree commit diff
path: root/synapse/storage/__init__.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-08-15 15:28:54 +0100
committerErik Johnston <erik@matrix.org>2014-08-15 15:28:54 +0100
commit01f089d9fbb9b89fa143ac44e51529fa8ed7ec12 (patch)
tree1f3544621b65749fd379fbb328a1745d775ef2fa /synapse/storage/__init__.py
parentStart chagning the events stream to work with the new DB schema (diff)
downloadsynapse-01f089d9fbb9b89fa143ac44e51529fa8ed7ec12.tar.xz
Correctly return new token when returning events. Serialize events correctly.
Diffstat (limited to 'synapse/storage/__init__.py')
-rw-r--r--synapse/storage/__init__.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py
index 46b9dbcbbf..750e86040e 100644
--- a/synapse/storage/__init__.py
+++ b/synapse/storage/__init__.py
@@ -57,7 +57,8 @@ class DataStore(RoomMemberStore, RoomStore,
         elif event.type == RoomTopicEvent.TYPE:
             yield self._store_room_topic(event)
 
-        yield self._store_event(event)
+        ret = yield self._store_event(event)
+        defer.returnValue(ret)
 
     @defer.inlineCallbacks
     def get_event(self, event_id):
@@ -114,6 +115,9 @@ class DataStore(RoomMemberStore, RoomStore,
                 }
             )
 
+        latest = yield self.get_room_events_max_id()
+        defer.returnValue(latest)
+
     @defer.inlineCallbacks
     def get_current_state(self, room_id, event_type=None, state_key=""):
         sql = (