mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-26 23:29:28 -05: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
@ -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 New Issue
Block a user