0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-14 12:23:48 +01:00

BF: Do not filter incoming member events. Before, only invitations to the current user were showned in the recents.

This commit is contained in:
Emmanuel ROHEE 2014-09-04 11:03:49 +02:00
parent 82cf76a8f9
commit b1b57a3f28

View file

@ -28,13 +28,8 @@ angular.module('RecentsController', ['matrixService', 'eventHandlerService'])
var listenToEventStream = function() { var listenToEventStream = function() {
// Refresh the list on matrix invitation and message event // Refresh the list on matrix invitation and message event
$scope.$on(eventHandlerService.MEMBER_EVENT, function(ngEvent, event, isLive) { $scope.$on(eventHandlerService.MEMBER_EVENT, function(ngEvent, event, isLive) {
var config = matrixService.config(); if (isLive) {
if (isLive && event.state_key === config.user_id && event.content.membership === "invite") { $scope.rooms[event.room_id].lastMsg = event;
console.log("Invited to room " + event.room_id);
// FIXME push membership to top level key to match /im/sync
event.membership = event.content.membership;
$scope.rooms[event.room_id] = event;
} }
}); });
$scope.$on(eventHandlerService.MSG_EVENT, function(ngEvent, event, isLive) { $scope.$on(eventHandlerService.MSG_EVENT, function(ngEvent, event, isLive) {