summary refs log tree commit diff
path: root/webclient/components
diff options
context:
space:
mode:
Diffstat (limited to 'webclient/components')
-rw-r--r--webclient/components/matrix/event-handler-service.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/webclient/components/matrix/event-handler-service.js b/webclient/components/matrix/event-handler-service.js
index e990d42d05..112b3ad96c 100644
--- a/webclient/components/matrix/event-handler-service.js
+++ b/webclient/components/matrix/event-handler-service.js
@@ -148,10 +148,10 @@ function(matrixService, $rootScope, $q, $timeout, mPresence) {
         // ts is later.
         var latestData = true;
         if (!isLiveEvent) {
-            var eventTs = event.ts;
+            var eventTs = event.origin_server_ts;
             var storedEvent = $rootScope.events.rooms[event.room_id][event.type];
             if (storedEvent) {
-                if (storedEvent.ts > eventTs) {
+                if (storedEvent.origin_server_ts > eventTs) {
                     // ignore it, we have a newer one already.
                     latestData = false;
                 }
@@ -256,7 +256,7 @@ function(matrixService, $rootScope, $q, $timeout, mPresence) {
             // could be a membership change, display name change, etc.
             // Find out which one.
             var memberChanges = undefined;
-            if (event.content.prev !== event.content.membership) {
+            if (event.prev_content && (event.prev_content.membership !== event.content.membership)) {
                 memberChanges = "membership";
             }
             else if (event.prev_content && (event.prev_content.displayname !== event.content.displayname)) {