[ADD/WIP/AYA] Sending errors, voice reqs, Ayawork.

Ayaya!
This commit is contained in:
LDA 2024-08-05 19:45:57 +02:00
commit 8588a6fb5c
7 changed files with 197 additions and 5 deletions

View file

@ -72,10 +72,19 @@ extern HashMap *ASGetPL(const ParseeConfig *conf, char *id);
* See-Also: ASGetPL */
extern void ASSetPL(const ParseeConfig *conf, char *id, HashMap *m);
/* Creates a room, with a masquerade user as its creator. This function
* returns it's ID if it exists. */
/** Creates a room, with a masquerade user ({by}) as its creator and an
* optional {alias}.
* --------
* Returns: a valid room ID[HEAP] | NULL
* Modifies: NOTHING
* See-Also: ASCreateDM */
extern char * ASCreateRoom(const ParseeConfig *c, char *by, char *alias);
/** Creates a new DM {with} a Matrix user, from a puppet {by}
* --------
* Returns: a valid room ID[HEAP] | NULL
* Modifies: NOTHING
* See-Also: ASCreateRoom */
extern char * ASCreateDM(const ParseeConfig *c, char *by, char *with);
/** Sets the user's global display{name}

View file

@ -107,4 +107,26 @@ extern bool XMPPHasError(XMLElement *stanza, char *type);
extern XMLElement * XMPPSendDisco(XMPPComponent *jabber, char *from, char *to);
extern bool XMPPDiscoAdvertises(XMLElement *disco, char *var);
/** Requests for 'voice' in a moderated MUC as a user by sending a specific
* form.
* -----------
* Returns: NOTHING
* Modifies: the XMPP MUCs state
* See-Also: https://xmpp.org/extensions/xep-0045.html#requestvoice */
extern void XMPPRequestVoice(XMPPComponent *jabber, char *from, char *muc);
/** Retrieves the error type in a stanza if existent.
* -----------------
* Returns: a valid string error type[stanza] | NULL
* Modifies: NOTHING
* See-Also: XMPPGetErrtext */
extern char * XMPPGetErrtype(XMLElement *stanza);
/** Retrieves the error text in a stanza if existent.
* -----------------
* Returns: a valid string error text[stanza] | NULL
* Modifies: NOTHING
* See-Also: XMPPGetErrtype */
extern char * XMPPGetErrtext(XMLElement *stanza);
#endif