mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-07 16:35:05 -04:00
display mtime_age in webclient
This commit is contained in:
parent
4068339770
commit
207ef144c5
3 changed files with 33 additions and 10 deletions
|
@ -120,6 +120,9 @@ angular.module('RoomController', [])
|
|||
if ("state" in chunk.content) {
|
||||
chunk.presenceState = chunk.content.state;
|
||||
}
|
||||
if ("mtime_age" in chunk.content) {
|
||||
chunk.mtime_age = chunk.content.mtime_age;
|
||||
}
|
||||
|
||||
$scope.members[chunk.target_user_id] = chunk;
|
||||
// get their display name and profile picture and set it to their
|
||||
|
@ -160,16 +163,14 @@ angular.module('RoomController', [])
|
|||
}
|
||||
var member = $scope.members[chunk.content.user_id];
|
||||
|
||||
// XXX: why not just pass the chunk straight through?
|
||||
if ("state" in chunk.content) {
|
||||
if (chunk.content.state === "online") {
|
||||
member.presenceState = "online";
|
||||
}
|
||||
else if (chunk.content.state === "offline") {
|
||||
member.presenceState = "offline";
|
||||
}
|
||||
else if (chunk.content.state === "unavailable") {
|
||||
member.presenceState = "unavailable";
|
||||
}
|
||||
member.presenceState = chunk.content.state;
|
||||
}
|
||||
|
||||
if ("mtime_age" in chunk.content) {
|
||||
// FIXME: should probably keep updating mtime_age in realtime like FB does
|
||||
member.mtime_age = chunk.content.mtime_age;
|
||||
}
|
||||
|
||||
// this may also contain a new display name or avatar url, so check.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue