mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 21:15:11 +00:00
[ADD/WIP] Bridge media Matrix->XMPP
We're on that Reverse Ideology phase.
This commit is contained in:
parent
82bed09b03
commit
fbf169a080
9 changed files with 118 additions and 6 deletions
|
|
@ -8,7 +8,7 @@
|
|||
#include <XML.h>
|
||||
|
||||
void
|
||||
XMPPSendPlain(XMPPComponent *comp, char *fr, char *to, char *msg, char *type, char *rst, char *rse, char *event_id)
|
||||
XMPPSendPlain(XMPPComponent *comp, char *fr, char *to, char *msg, char *type, char *rst, char *rse, char *event_id, char *oob)
|
||||
{
|
||||
XMLElement *message, *body, *data, *parsee;
|
||||
char *from;
|
||||
|
|
@ -25,7 +25,7 @@ XMPPSendPlain(XMPPComponent *comp, char *fr, char *to, char *msg, char *type, ch
|
|||
XMLAddAttr(message, "type", type);
|
||||
|
||||
body = XMLCreateTag("body");
|
||||
data = XMLCreateText(msg);
|
||||
data = XMLCreateText(oob ? oob : msg);
|
||||
|
||||
/* TODO: Add Parsee specific fields here */
|
||||
parsee = XMLCreateTag("x-parsee");
|
||||
|
|
@ -65,6 +65,18 @@ XMPPSendPlain(XMPPComponent *comp, char *fr, char *to, char *msg, char *type, ch
|
|||
/* TODO: Add custom fields depending on the caller's wishes */
|
||||
}
|
||||
|
||||
if (oob)
|
||||
{
|
||||
XMLElement *xoob, *oob_data, *oob_url;
|
||||
|
||||
xoob = XMLCreateTag("x");
|
||||
XMLAddAttr(xoob, "xmlns", "jabber:x:oob");
|
||||
oob_url = XMLCreateTag("url");
|
||||
oob_data = XMLCreateText(oob);
|
||||
XMLAddChild(oob_url, oob_data);
|
||||
XMLAddChild(xoob, oob_url);
|
||||
XMLAddChild(message, xoob);
|
||||
}
|
||||
if (rst && rse)
|
||||
{
|
||||
int off = ParseeFindDatastart(msg);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue