[ADD] Push pupmet events too.

This commit is contained in:
LDA 2024-06-27 04:02:26 +02:00
commit 82bed09b03
4 changed files with 25 additions and 5 deletions

View file

@ -8,7 +8,7 @@
#include <XML.h>
void
XMPPSendPlain(XMPPComponent *comp, char *fr, char *to, char *msg, char *type, char *rst, char *rse)
XMPPSendPlain(XMPPComponent *comp, char *fr, char *to, char *msg, char *type, char *rst, char *rse, char *event_id)
{
XMLElement *message, *body, *data, *parsee;
char *from;
@ -33,6 +33,7 @@ XMPPSendPlain(XMPPComponent *comp, char *fr, char *to, char *msg, char *type, ch
XMLElement *parsee_version, *ver_elem;
XMLElement *parsee_link, *link_elem;
XMLElement *parsee_text, *text_elem;
XMLElement *parsee_event, *event_elem;
parsee_version = XMLCreateTag("version");
ver_elem = XMLCreateText(VERSION);
@ -53,6 +54,14 @@ XMPPSendPlain(XMPPComponent *comp, char *fr, char *to, char *msg, char *type, ch
text_elem = XMLCreateText("LDA will never beat the allegations");
XMLAddChild(parsee_text, text_elem);
XMLAddChild(parsee, parsee_text);
if (event_id)
{
parsee_event = XMLCreateTag("event-id");
event_elem = XMLCreateText(event_id);
XMLAddChild(parsee_event, event_elem);
XMLAddChild(parsee, parsee_event);
}
/* TODO: Add custom fields depending on the caller's wishes */
}