mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 21:25:11 +00:00
[ADD/WIP] Start having MUCwork half-decent
Still lots of things required(like using the users JIDs whenever possible, otherwise dropping to occupant ID), images, replies, rich data with HTML and whatever XMPP has, etc...
This commit is contained in:
parent
d3b7f2fee0
commit
a84ce05b9d
12 changed files with 329 additions and 40 deletions
|
|
@ -36,4 +36,7 @@ extern void ASSetState(const ParseeConfig *conf, char *id, char *type, char *key
|
|||
/* Creates a room, with a masquerade user as its creator. This function
|
||||
* returns it's ID if it exists. */
|
||||
extern char * ASCreateRoom(const ParseeConfig *c, char *by, char *alias);
|
||||
|
||||
/* Sets a user's displayname */
|
||||
extern void ASSetName(const ParseeConfig *c, char *user, char *name);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -14,4 +14,7 @@ extern HashMap * MatrixCreateMessage(char *body);
|
|||
|
||||
/* Creates the content for a m.room.name state event */
|
||||
extern HashMap * MatrixCreateNameState(char *name);
|
||||
|
||||
/* Creates a join membership with a specific nickname */
|
||||
extern HashMap * MatrixCreateNickChange(char *nick);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -73,11 +73,14 @@ extern void ParseeEventHandler(ParseeData *, HashMap *);
|
|||
/* Verifies if a user is a Parsee puppet user. */
|
||||
extern bool ParseeIsPuppet(const ParseeConfig *, char *);
|
||||
|
||||
/* Verifies if a user is a Parsee puppet user on XMPP. */
|
||||
extern bool ParseeIsJabberPuppet(const ParseeConfig *, char *);
|
||||
|
||||
/* Decodes a local JID for a user into a string. */
|
||||
extern char * ParseeDecodeLocalJID(const ParseeConfig *, char *);
|
||||
|
||||
/* Encodes a JID into a Parsee localpart */
|
||||
extern char * ParseeEncodeJID(const ParseeConfig *, char *);
|
||||
extern char * ParseeEncodeJID(const ParseeConfig *, char *, bool);
|
||||
|
||||
/* Gets the localpart of a MXID */
|
||||
extern char * ParseeGetLocal(char *);
|
||||
|
|
@ -111,6 +114,9 @@ extern void ParseePushDMRoom(ParseeData *, char *mxid, char *jid, char *r);
|
|||
/* Trims the component from a JID */
|
||||
extern char * ParseeTrimJID(char *jid);
|
||||
|
||||
/* Gets the component from a JID */
|
||||
extern char * ParseeGetResource(char *jid);
|
||||
|
||||
/* Decodes a room alias into a MUC JID */
|
||||
extern char * ParseeDecodeLocalMUC(const ParseeConfig *c, char *alias);
|
||||
|
||||
|
|
@ -132,4 +138,13 @@ extern char * ParseeGetRoomID(ParseeData *, char *chat_id);
|
|||
/* Finds the MUC JID from a 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);
|
||||
|
||||
/* Checks if a stanza is not duplicated in a chat ID */
|
||||
extern bool ParseeVerifyStanza(ParseeData *, char *chat_id, char *stanza_id);
|
||||
|
||||
/* Sends presence requests for every MUC around as a fake JID */
|
||||
extern void ParseeSendPresence(ParseeData *);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ extern void XMPPJoinMUC(XMPPComponent *comp, char *fr, char *muc);
|
|||
|
||||
/* TODO: XMPP stuff, I don't fucking know, I'm not a Jabbernerd. */
|
||||
extern void XMPPSendPlain(XMPPComponent *c, char *f, char *t, char *m, char *type);
|
||||
extern void XMPPSendMUC(XMPPComponent *comp, char *fr, char *as, char *to, char *msg, char *type);
|
||||
|
||||
/* Closes a raw component stream. */
|
||||
extern void XMPPEndCompStream(XMPPComponent *stream);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue