summary refs log tree commit diff
path: root/webclient
diff options
context:
space:
mode:
authorEmmanuel ROHEE <erohee@amdocs.com>2014-09-10 14:45:32 +0200
committerEmmanuel ROHEE <erohee@amdocs.com>2014-09-10 14:45:32 +0200
commit130cbdd7afeb2aec5ab497ed7a5ff21ddc0e7c5e (patch)
treea0e2b8e6e2e4e57cc7dc492ee0ef14ba33a46c62 /webclient
parentReenabled handle of room states events in initialSync but do not add them to ... (diff)
downloadsynapse-130cbdd7afeb2aec5ab497ed7a5ff21ddc0e7c5e.tar.xz
dedup events: state events conflict with messages events. Do not consider them in deduplication
Diffstat (limited to '')
-rw-r--r--webclient/components/matrix/event-handler-service.js16
1 files changed, 9 insertions, 7 deletions
diff --git a/webclient/components/matrix/event-handler-service.js b/webclient/components/matrix/event-handler-service.js
index d7705c8e3e..80a15182ae 100644
--- a/webclient/components/matrix/event-handler-service.js
+++ b/webclient/components/matrix/event-handler-service.js
@@ -202,14 +202,16 @@ 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 (event.event_id && eventMap[event.event_id]) {
-                console.log("discarding duplicate event: " + JSON.stringify(event, undefined, 4));
-                return;
-            }
-            else {
-                eventMap[event.event_id] = 1;
+            if (!isStateEvent) {    // Do not consider state events
+                if (event.event_id && eventMap[event.event_id]) {
+                    console.log("discarding duplicate event: " + JSON.stringify(event, undefined, 4));
+                    return;
+                }
+                else {
+                    eventMap[event.event_id] = 1;
+                }
             }
-  
+
             if (event.type.indexOf('m.call.') === 0) {
                 handleCallEvent(event, isLiveEvent);
             }