summary refs log tree commit diff
path: root/webclient/components
diff options
context:
space:
mode:
authorEmmanuel ROHEE <erohee@amdocs.com>2014-09-15 18:22:38 +0200
committerEmmanuel ROHEE <erohee@amdocs.com>2014-09-15 18:22:38 +0200
commitb0483cd47d72ea73760c8301f5729d840ceb7683 (patch)
treea52e834e416ae3691f5821109afebfdf16fdd519 /webclient/components
parentRecents must not show temporary fake messages (diff)
downloadsynapse-b0483cd47d72ea73760c8301f5729d840ceb7683.tar.xz
Filter room where the user has been banned
Diffstat (limited to 'webclient/components')
-rw-r--r--webclient/components/matrix/event-handler-service.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/webclient/components/matrix/event-handler-service.js b/webclient/components/matrix/event-handler-service.js
index 6fd77c4f29..4b0566fe33 100644
--- a/webclient/components/matrix/event-handler-service.js
+++ b/webclient/components/matrix/event-handler-service.js
@@ -398,6 +398,22 @@ angular.module('eventHandlerService', [])
             }
 
             return memberCount;
+        },
+        
+        /**
+         * Get the member object of a room member
+         * @param {String} room_id the room id
+         * @param {String} user_id the id of the user
+         * @returns {undefined | Object} the member object of this user in this room if he is part of the room
+         */
+        getMember: function(room_id, user_id) {
+            var member;
+            
+            var room = $rootScope.events.rooms[room_id];
+            if (room) {
+                member = room.members[user_id];
+            }
+            return member;
         }
     };
 }]);