Get presence for members when you enter a room (it was coming down but wasn't being stored in the right place)

This commit is contained in:
Kegan Dougal 2014-08-15 17:47:45 +01:00
parent 5b817ecd44
commit 0e6a2f87f9

View file

@ -111,6 +111,10 @@ angular.module('RoomController', [])
var updateMemberList = function(chunk) {
var isNewMember = !(chunk.target_user_id in $scope.members);
if (isNewMember) {
if ("state" in chunk.content) {
chunk.presenceState = chunk.content.state;
}
$scope.members[chunk.target_user_id] = chunk;
// get their display name and profile picture and set it to their
// member entry in $scope.members. We HAVE to use $timeout with 0 delay