mirror of
https://github.com/element-hq/synapse
synced 2024-09-01 21:30:21 +00:00
Member event: store use the the latest one
This commit is contained in:
parent
da3f842b8c
commit
30bfa911fc
1 changed files with 7 additions and 2 deletions
|
@ -129,8 +129,13 @@ angular.module('eventHandlerService', [])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$rootScope.events.rooms[event.room_id].members[event.state_key] = event;
|
// Use data from state event or the latest data from the stream.
|
||||||
$rootScope.$broadcast(MEMBER_EVENT, event, isLiveEvent);
|
// Do not care of events that come when paginating back
|
||||||
|
if (isStateEvent || isLiveEvent) {
|
||||||
|
$rootScope.events.rooms[event.room_id].members[event.state_key] = event;
|
||||||
|
}
|
||||||
|
|
||||||
|
$rootScope.$broadcast(MEMBER_EVENT, event, isLiveEvent, isStateEvent);
|
||||||
};
|
};
|
||||||
|
|
||||||
var handlePresence = function(event, isLiveEvent) {
|
var handlePresence = function(event, isLiveEvent) {
|
||||||
|
|
Loading…
Reference in a new issue