[ADD/WIP] Start unifying DMs and MUCs

I really need to dispatch XMPP stanza management.
This commit is contained in:
LDA 2024-07-03 14:40:26 +02:00
commit 5f2c3a9cb8
10 changed files with 570 additions and 87 deletions

View file

@ -159,13 +159,16 @@ extern char * ParseeGetMUCID(ParseeData *, char *chat_id);
/* Pushes a stanza ID to a chat ID */
extern void ParseePushStanza(ParseeData *, char *chat_id, char *stanza_id, char *origin_id, char *event, char *sender);
extern void ParseePushDMStanza(ParseeData *, char *room_id, char *stanza_id, char *origin_id, char *event, char *sender);
/* Checks if a stanza is not duplicated in a chat ID */
extern bool ParseeVerifyStanza(ParseeData *, char *chat_id, char *stanza_id);
/* Gets the stanza ID and sender of an event */
extern bool ParseeGetStanzaInfo(ParseeData *, char *c_id, char *e, char **st, char **se);
extern bool ParseeGetDMStanzaInfo(ParseeData *, char *r_id, char *e, char **st, char **se);
extern bool ParseeGetOrigin(ParseeData *data, char *chat_id, char *ev, char **o);
extern bool ParseeGetDMOrigin(ParseeData *data, char *chat_id, char *ev, char **o);
/* Sends presence requests for every MUC around as a fake JID */
extern void ParseeSendPresence(ParseeData *);
@ -186,6 +189,9 @@ extern char * ParseeXMPPify(HashMap *event);
extern char * ParseeEventFromID(ParseeData *d, char *c_id, char *ori_id);
extern char * ParseeEventFromSID(ParseeData *d, char *c_id, char *ori_id);
extern char * ParseeDMEventFromID(ParseeData *d, char *r_id, char *ori_id);
extern char * ParseeDMEventFromSID(ParseeData *d, char *r_id, char *ori_id);
/* Gets a Parsee "shim" link to an MXC, usable as unauth for a limited time */
extern char * ParseeToUnauth(ParseeData *data, char *mxc);
@ -201,4 +207,7 @@ extern void ParseeGlobalBan(ParseeData *, char *user);
/* Verifies if a user was globally banned. If so, then apply actions to the
* room ID */
extern bool ParseeManageBan(ParseeData *, char *user, char *room);
/* Same as ParseeVerifyStanza, but DMs */
extern bool ParseeVerifyDMStanza(ParseeData *data, char *room_id, char *id);
#endif