mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-20 00:44:18 -05:00
BF: Do not be polluted by ops events that come when paginating back
This commit is contained in:
parent
b1195c125f
commit
4777c1cd5b
@ -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 New Issue
Block a user