mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
Fixed presence state update. Specifically, the current user was sometimes indicated as offline
This commit is contained in:
parent
02f4e3b3ff
commit
c9ee9b45c7
@ -201,9 +201,15 @@ angular.module('RoomController', ['ngSanitize', 'mFileInput'])
|
||||
}
|
||||
}
|
||||
else {
|
||||
// selectively update membership else it will nuke the picture and displayname too :/
|
||||
// selectively update membership and presence else it will nuke the picture and displayname too :/
|
||||
var member = $scope.members[target_user_id];
|
||||
member.content.membership = chunk.content.membership;
|
||||
member.membership = chunk.content.membership;
|
||||
if ("state" in chunk.content) {
|
||||
member.presenceState = chunk.content.state;
|
||||
}
|
||||
if ("mtime_age" in chunk.content) {
|
||||
member.mtime_age = chunk.content.mtime_age;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -378,9 +384,21 @@ angular.module('RoomController', ['ngSanitize', 'mFileInput'])
|
||||
// Make recents highlight the current room
|
||||
$scope.recentsSelectedRoomID = $scope.room_id;
|
||||
|
||||
paginate(MESSAGES_PER_PAGINATION);
|
||||
// Get the up-to-date the current member list
|
||||
matrixService.getMemberList($scope.room_id).then(
|
||||
function(response) {
|
||||
for (var i = 0; i < response.data.chunk.length; i++) {
|
||||
var chunk = response.data.chunk[i];
|
||||
updateMemberList(chunk);
|
||||
updateMemberListPresenceAge();
|
||||
}
|
||||
},
|
||||
function(error) {
|
||||
$scope.feedback = "Failed get member list: " + error.data.error;
|
||||
}
|
||||
);
|
||||
|
||||
updateMemberListPresenceAge();
|
||||
paginate(MESSAGES_PER_PAGINATION);
|
||||
};
|
||||
|
||||
$scope.inviteUser = function(user_id) {
|
||||
|
Loading…
Reference in New Issue
Block a user