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

paul/schema_breaking_changes
Erik Johnston 2014-08-22 10:56:09 +01:00
parent 6118a102c1
commit f3cea238b9
1 changed files with 2 additions and 0 deletions

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?