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

pull/8/head
Emmanuel ROHEE 2014-09-04 11:03:49 +02:00
parent 82cf76a8f9
commit b1b57a3f28
1 changed files with 2 additions and 7 deletions

View File

@ -28,13 +28,8 @@ angular.module('RecentsController', ['matrixService', 'eventHandlerService'])
var listenToEventStream = function() {
// Refresh the list on matrix invitation and message event
$scope.$on(eventHandlerService.MEMBER_EVENT, function(ngEvent, event, isLive) {
var config = matrixService.config();
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;
$scope.rooms[event.room_id] = event;
if (isLive) {
$scope.rooms[event.room_id].lastMsg = event;
}
});
$scope.$on(eventHandlerService.MSG_EVENT, function(ngEvent, event, isLive) {