mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 19:55:10 +00:00
[MOD/WIP] Kill off the stanza sending function
The stanza sender is dead. All hail the Stanza Builder.
This commit is contained in:
parent
f6b0d741d5
commit
ffc0679493
8 changed files with 379 additions and 184 deletions
|
|
@ -7,6 +7,7 @@
|
|||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <StanzaBuilder.h>
|
||||
#include <Matrix.h>
|
||||
#include <AS.h>
|
||||
|
||||
|
|
@ -229,6 +230,7 @@ static void
|
|||
ParseeMessageHandler(ParseeData *data, HashMap *event)
|
||||
{
|
||||
XMPPComponent *jabber = data->jabber;
|
||||
StanzaBuilder *builder;
|
||||
DbRef *ref = NULL;
|
||||
HashMap *json;
|
||||
|
||||
|
|
@ -338,12 +340,16 @@ ParseeMessageHandler(ParseeData *data, HashMap *event)
|
|||
}
|
||||
{
|
||||
char *xmpp_ident = StrRandom(32);
|
||||
XMPPSendPlainID(
|
||||
jabber, xmppified_user, to,
|
||||
xepd ? xepd : body, type,
|
||||
stanza, sender, ev_id, unauth, origin_id,
|
||||
xmpp_ident
|
||||
);
|
||||
builder = CreateStanzaBuilder(xmppified_user, to, xmpp_ident);
|
||||
SetStanzaType(builder, type);
|
||||
SetStanzaBody(builder, xepd ? xepd : body);
|
||||
SetStanzaReply(builder, stanza, sender);
|
||||
SetStanzaLink(builder, unauth);
|
||||
SetStanzaEdit(builder, origin_id);
|
||||
SetStanzaXParsee(builder, event);
|
||||
|
||||
WriteoutStanza(builder, jabber);
|
||||
DestroyStanzaBuilder(builder);
|
||||
|
||||
if (direct)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue