[ADD/WIP] Editing support XMPP->Matrix

This commit is contained in:
LDA 2024-06-25 17:20:00 +02:00
commit ae740878c8
13 changed files with 249 additions and 106 deletions

View file

@ -12,6 +12,9 @@ extern HashMap * MatrixCreateNotice(char *body);
/* Creates the content for a normal message. */
extern HashMap * MatrixCreateMessage(char *body);
/* Creates the content for a replace message. */
extern HashMap * MatrixCreateReplace(char *event, char *body);
/* Creates the content for a media file. */
extern HashMap * MatrixCreateMedia(char *mxc, char *body, char *mime);

View file

@ -145,7 +145,7 @@ extern char * ParseeGetRoomID(ParseeData *, char *chat_id);
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 *event, char *sender);
extern void ParseePushStanza(ParseeData *, char *chat_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);
@ -167,4 +167,7 @@ extern int ParseeFindDatastart(char *data);
/* XMPP-ifies a message event to XEP-0393 if possible. */
extern char * ParseeXMPPify(HashMap *event);
/* Finds an event ID from an ID in the stanza's attributes */
extern char * ParseeEventFromID(ParseeData *d, char *c_id, char *ori_id);
#endif

View file

@ -61,4 +61,14 @@ extern void XMPPFreeMUCInfo(MUCInfo info);
/* Checks if a stanza has an x-parsee element */
extern bool XMPPIsParseeStanza(XMLElement *);
/* Returns the stanza ID of a stanza, if existent */
extern char * XMPPGetStanzaID(XMLElement *);
/* Returns the origin ID of a stanza, if existent */
extern char * XMPPGetOriginID(XMLElement *);
/* Returns the origin ID of the replaced stanza, if the current one
* is a replacement notice */
extern char * XMPPGetReplacedID(XMLElement *);
#endif