diff options
author | Erik Johnston <erik@matrix.org> | 2014-08-18 11:06:59 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-08-18 11:06:59 +0100 |
commit | 291010f100f20ef56b731ae51341abdc4d4a7835 (patch) | |
tree | 173c4c891c71b55021fa316487b5ed63999b0cc8 /synapse/api | |
parent | We don't need to do a json.loads here (diff) | |
download | synapse-291010f100f20ef56b731ae51341abdc4d4a7835.tar.xz |
Not all event streams returns SynapseEvents
Diffstat (limited to 'synapse/api')
-rw-r--r-- | synapse/api/streams/event.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/api/streams/event.py b/synapse/api/streams/event.py index 895a96b5b9..414b05be30 100644 --- a/synapse/api/streams/event.py +++ b/synapse/api/streams/event.py @@ -18,6 +18,7 @@ from twisted.internet import defer from synapse.api.errors import EventStreamError +from synapse.api.events import SynapseEvent from synapse.api.events.room import ( RoomMemberEvent, MessageEvent, FeedbackEvent, RoomTopicEvent ) @@ -160,7 +161,10 @@ class EventStream(PaginationStream): self.user_id, from_pkey, to_pkey, limit ) - chunk += [e.get_dict() for e in event_chunk] + chunk.extend([ + e.get_dict() if isinstance(e, SynapseEvent) else e + for e in event_chunk + ]) next_ver.append(str(max_pkey)) defer.returnValue((chunk, EventStream.SEPARATOR.join(next_ver))) |