mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-24 18:45:52 +03:00
BF: Do not be polluted by ops events that come when paginating back
This commit is contained in:
parent
b1195c125f
commit
4777c1cd5b
1 changed files with 5 additions and 2 deletions
|
@ -108,8 +108,11 @@ angular.module('eventHandlerService', [])
|
|||
var handlePowerLevels = function(event, isLiveEvent) {
|
||||
initRoom(event.room_id);
|
||||
|
||||
$rootScope.events.rooms[event.room_id][event.type] = event;
|
||||
$rootScope.$broadcast(POWERLEVEL_EVENT, event, isLiveEvent);
|
||||
// Keep the latest data. Do not care of events that come when paginating back
|
||||
if (!$rootScope.events.rooms[event.room_id][event.type] || isLiveEvent) {
|
||||
$rootScope.events.rooms[event.room_id][event.type] = event;
|
||||
$rootScope.$broadcast(POWERLEVEL_EVENT, event, isLiveEvent);
|
||||
}
|
||||
};
|
||||
|
||||
var handleCallEvent = function(event, isLiveEvent) {
|
||||
|
|
Loading…
Reference in a new issue