Check if the membership message was for the room we were in before updating the membership list
This commit is contained in:
parent
6118a102c1
commit
f3cea238b9
|
@ -152,6 +152,8 @@ angular.module('RoomController', ['ngSanitize', 'mUtilities'])
|
||||||
};
|
};
|
||||||
|
|
||||||
var updateMemberList = function(chunk) {
|
var updateMemberList = function(chunk) {
|
||||||
|
if (chunk.room_id != $scope.room_id) return;
|
||||||
|
|
||||||
var isNewMember = !(chunk.target_user_id in $scope.members);
|
var isNewMember = !(chunk.target_user_id in $scope.members);
|
||||||
if (isNewMember) {
|
if (isNewMember) {
|
||||||
// FIXME: why are we copying these fields around inside chunk?
|
// FIXME: why are we copying these fields around inside chunk?
|
||||||
|
|
Loading…
Reference in New Issue