mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 21:25:11 +00:00
[ADD/WIP] Editing support XMPP->Matrix
This commit is contained in:
parent
771c3271ad
commit
ae740878c8
13 changed files with 249 additions and 106 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue