mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-14 12:33:49 +01:00
Recents update: do not care of events coming from the past (they are fired when doing pagination of room messages in the past)
This commit is contained in:
parent
9b2cb41dcf
commit
089d1b1b78
1 changed files with 4 additions and 2 deletions
|
@ -29,7 +29,7 @@ angular.module('RecentsController', ['matrixService', 'eventHandlerService'])
|
|||
// Refresh the list on matrix invitation and message event
|
||||
$scope.$on(eventHandlerService.MEMBER_EVENT, function(ngEvent, event, isLive) {
|
||||
var config = matrixService.config();
|
||||
if (event.state_key === config.user_id && event.content.membership === "invite") {
|
||||
if (isLive && event.state_key === config.user_id && event.content.membership === "invite") {
|
||||
console.log("Invited to room " + event.room_id);
|
||||
// FIXME push membership to top level key to match /im/sync
|
||||
event.membership = event.content.membership;
|
||||
|
@ -39,7 +39,9 @@ angular.module('RecentsController', ['matrixService', 'eventHandlerService'])
|
|||
}
|
||||
});
|
||||
$scope.$on(eventHandlerService.MSG_EVENT, function(ngEvent, event, isLive) {
|
||||
$scope.rooms[event.room_id].lastMsg = event;
|
||||
if (isLive) {
|
||||
$scope.rooms[event.room_id].lastMsg = event;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue