mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 11:54:56 -04:00
Determine and send user presence state
This commit is contained in:
parent
b07bc9bdbd
commit
c21fcb3373
4 changed files with 140 additions and 5 deletions
|
@ -358,6 +358,23 @@ angular.module('matrixService', [])
|
|||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
// Enum of presence state
|
||||
presence: {
|
||||
offline: "offline",
|
||||
unavailable: "unavailable",
|
||||
online: "online",
|
||||
free_for_chat: "free_for_chat"
|
||||
},
|
||||
|
||||
// Set the logged in user presence state
|
||||
setUserPresence: function(presence) {
|
||||
var path = "/presence/$user_id/status";
|
||||
path = path.replace("$user_id", config.user_id);
|
||||
return doRequest("PUT", path, undefined, {
|
||||
state: presence
|
||||
});
|
||||
},
|
||||
|
||||
/****** Permanent storage of user information ******/
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue