From b1b57a3f2883c3072d6a4bc91922adea7c47f269 Mon Sep 17 00:00:00 2001
From: Emmanuel ROHEE <erohee@amdocs.com>
Date: Thu, 4 Sep 2014 11:03:49 +0200
Subject: [PATCH] BF: Do not filter incoming member events. Before, only
 invitations to the current user  were showned in the recents.

---
 webclient/recents/recents-controller.js | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/webclient/recents/recents-controller.js b/webclient/recents/recents-controller.js
index 3209f2cbdf..4cf501b4e7 100644
--- a/webclient/recents/recents-controller.js
+++ b/webclient/recents/recents-controller.js
@@ -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) {
-- 
GitLab