mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 21:15:11 +00:00
[MOD] Carve the way to XMPP rich replies
Bifrost could *never*!
This commit is contained in:
parent
10e140e2a2
commit
fe77906cde
10 changed files with 126 additions and 18 deletions
|
|
@ -7,7 +7,7 @@
|
|||
#include <XML.h>
|
||||
|
||||
void
|
||||
XMPPSendPlain(XMPPComponent *comp, char *fr, char *to, char *msg, char *type)
|
||||
XMPPSendPlain(XMPPComponent *comp, char *fr, char *to, char *msg, char *type, char *rst, char *rse)
|
||||
{
|
||||
XMLElement *message, *body, *data, *parsee;
|
||||
char *from;
|
||||
|
|
@ -50,6 +50,15 @@ XMPPSendPlain(XMPPComponent *comp, char *fr, char *to, char *msg, char *type)
|
|||
/* TODO: Add custom fields depending on the caller's wishes */
|
||||
}
|
||||
|
||||
if (rst && rse)
|
||||
{
|
||||
XMLElement *reply = XMLCreateTag("reply");
|
||||
XMLAddAttr(reply, "to", rse);
|
||||
XMLAddAttr(reply, "id", rst);
|
||||
XMLAddAttr(reply, "xmlns", "urn:xmpp:reply:0");
|
||||
XMLAddChild(message, reply);
|
||||
}
|
||||
|
||||
XMLAddChild(message, body);
|
||||
XMLAddChild(message, parsee);
|
||||
XMLAddChild(body, data);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue