Check if the membership message was for the room we were in before updating the membership list

This commit is contained in:
Erik Johnston 2014-08-22 10:56:09 +01:00
parent 6118a102c1
commit f3cea238b9

View File

@ -152,6 +152,8 @@ angular.module('RoomController', ['ngSanitize', 'mUtilities'])
};
var updateMemberList = function(chunk) {
if (chunk.room_id != $scope.room_id) return;
var isNewMember = !(chunk.target_user_id in $scope.members);
if (isNewMember) {
// FIXME: why are we copying these fields around inside chunk?