mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 22:55:11 +00:00
[ADD/WIP] XMPP->Matrix user statuses
Still untested because of performance reasons around statuses. Also, how is presence basically a spec feature, and yet somehow manages to be implemented by _no one_? Please, _implement it_ into yall's clients.
This commit is contained in:
parent
e7c44a05e2
commit
e4c6994f61
3 changed files with 92 additions and 2 deletions
|
|
@ -57,10 +57,32 @@ extern void ASSetPL(const ParseeConfig *conf, char *id, HashMap *m);
|
|||
* returns it's ID if it exists. */
|
||||
extern char * ASCreateRoom(const ParseeConfig *c, char *by, char *alias);
|
||||
|
||||
/* Sets a user's displayname */
|
||||
/** Sets the user's global display{name]
|
||||
* --------
|
||||
* Returns: NOTHING
|
||||
* Modifies: [EXT:User status]
|
||||
* See-Also: ASGetName, ASSetStatus, ASSetAvatar */
|
||||
extern void ASSetName(const ParseeConfig *c, char *user, char *name);
|
||||
|
||||
/** Sets the {user}'s global avatar, as an {mxc} URI
|
||||
* --------
|
||||
* Returns: NOTHING
|
||||
* Modifies: [EXT:User status]
|
||||
* See-Also: ASGetName, ASSetStatus */
|
||||
extern void ASSetAvatar(const ParseeConfig *c, char *user, char *mxc);
|
||||
|
||||
typedef enum UserStatus {
|
||||
USER_STATUS_ONLINE,
|
||||
USER_STATUS_OFFLINE,
|
||||
USER_STATUS_UNAVAILABLE
|
||||
} UserStatus;
|
||||
/** Sets the user's status and message, to be seen by other clients.
|
||||
* --------
|
||||
* Returns: NOTHING
|
||||
* Modifies: [EXT:User status]
|
||||
* See-Also: https://spec.matrix.org/v1.11/client-server-api/#put_matrixclientv3presenceuseridstatus, ASSetName, ASSetAvatar */
|
||||
extern void ASSetStatus(const ParseeConfig *c, char *user, UserStatus status, char *msg);
|
||||
|
||||
/* Returns the user's name in a room, or a copy of the MXID itself, to be
|
||||
* Free'd. */
|
||||
extern char * ASGetName(const ParseeConfig *c, char *room, char *user);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue