summary refs log tree commit diff
diff options
context:
space:
mode:
authorEmmanuel ROHEE <erohee@amdocs.com>2014-09-10 13:48:33 +0200
committerEmmanuel ROHEE <erohee@amdocs.com>2014-09-10 13:48:33 +0200
commitc2afc6cd0a4f375149956b11b471a8f5d840afde (patch)
treeb551a45f9e925f71e79c0aef27b268606b594c45
parentImproved requests: pagination is done from the data received in initialSync (diff)
downloadsynapse-c2afc6cd0a4f375149956b11b471a8f5d840afde.tar.xz
Presence events do not have event id. Do not discard them
-rw-r--r--webclient/components/matrix/event-handler-service.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/webclient/components/matrix/event-handler-service.js b/webclient/components/matrix/event-handler-service.js
index 24d634a28b..14ac79dd8f 100644
--- a/webclient/components/matrix/event-handler-service.js
+++ b/webclient/components/matrix/event-handler-service.js
@@ -199,7 +199,7 @@ angular.module('eventHandlerService', [])
             // AND from the event stream.
             // FIXME: This workaround should be no more required when /initialSync on a particular room
             // will be available (as opposite to the global /initialSync done at startup)
-            if (eventMap[event.event_id]) {
+            if (event.event_id && eventMap[event.event_id]) {
                 console.log("discarding duplicate event: " + JSON.stringify(event, undefined, 4));
                 return;
             }
@@ -258,7 +258,7 @@ angular.module('eventHandlerService', [])
 
         // Handle messages from /initialSync or /messages
         handleRoomMessages: function(room_id, messages, isLiveEvents) {
-            this.handleEvents(messages.chunk);
+            this.handleEvents(messages.chunk, isLiveEvents);
 
             // Store how far back we've paginated
             // This assumes the paginations requests are contiguous and in reverse chronological order