diff options
author | Erik Johnston <erik@matrix.org> | 2014-08-15 15:28:54 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-08-15 15:28:54 +0100 |
commit | 01f089d9fbb9b89fa143ac44e51529fa8ed7ec12 (patch) | |
tree | 1f3544621b65749fd379fbb328a1745d775ef2fa /synapse/api | |
parent | Start chagning the events stream to work with the new DB schema (diff) | |
download | synapse-01f089d9fbb9b89fa143ac44e51529fa8ed7ec12.tar.xz |
Correctly return new token when returning events. Serialize events correctly.
Diffstat (limited to 'synapse/api')
-rw-r--r-- | synapse/api/notifier.py | 3 | ||||
-rw-r--r-- | synapse/api/streams/event.py | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/synapse/api/notifier.py b/synapse/api/notifier.py index 65b5a4ebb3..9f622df6bb 100644 --- a/synapse/api/notifier.py +++ b/synapse/api/notifier.py @@ -15,6 +15,7 @@ from synapse.api.constants import Membership from synapse.api.events.room import RoomMemberEvent +from synapse.api.streams.event import EventsStreamData from twisted.internet import defer from twisted.internet import reactor @@ -66,7 +67,7 @@ class Notifier(object): self._notify_and_callback( user_id=user_id, event_data=event.get_dict(), - stream_type=event.type, + stream_type=EventsStreamData.EVENT_TYPE, store_id=store_id) def on_new_user_event(self, user_id, event_data, stream_type, store_id): diff --git a/synapse/api/streams/event.py b/synapse/api/streams/event.py index 427363cad4..895a96b5b9 100644 --- a/synapse/api/streams/event.py +++ b/synapse/api/streams/event.py @@ -160,7 +160,7 @@ class EventStream(PaginationStream): self.user_id, from_pkey, to_pkey, limit ) - chunk += event_chunk + chunk += [e.get_dict() for e in event_chunk] next_ver.append(str(max_pkey)) defer.returnValue((chunk, EventStream.SEPARATOR.join(next_ver))) |