When the user has been kicked or banned from a room, remove the room from his recents list
This commit is contained in:
parent
5132fcdb8b
commit
746ed57c0e
|
@ -51,8 +51,15 @@ angular.module('RecentsController', ['matrixService', 'matrixFilter', 'eventHand
|
||||||
room_id:event.room_id
|
room_id:event.room_id
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
else if (event.state_key === matrixService.config().user_id && "invite" !== event.membership && "join" !== event.membership) {
|
||||||
|
// The user has been kicked or banned from the room, remove this room from the recents
|
||||||
|
delete $rootScope.rooms[event.room_id];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($rootScope.rooms[event.room_id]) {
|
||||||
$rootScope.rooms[event.room_id].lastMsg = event;
|
$rootScope.rooms[event.room_id].lastMsg = event;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
$rootScope.$on(eventHandlerService.MSG_EVENT, function(ngEvent, event, isLive) {
|
$rootScope.$on(eventHandlerService.MSG_EVENT, function(ngEvent, event, isLive) {
|
||||||
if (isLive) {
|
if (isLive) {
|
||||||
|
|
Loading…
Reference in New Issue