mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 21:35:10 +00:00
[ADD/WIP] VCard4, slightly more PEPwerk
This commit is contained in:
parent
3c495a8a81
commit
ee004ca9c0
10 changed files with 313 additions and 32 deletions
|
|
@ -120,6 +120,8 @@ IQResult(ParseeData *args, XMLElement *stanza, XMPPThread *thr)
|
|||
{
|
||||
XMLElement *vcard = XMLookForTKV(stanza, "vCard", "xmlns", "vcard-temp");
|
||||
|
||||
|
||||
/* TODO: Move this to PEP */
|
||||
XMLElement *event = XMLookForTKV(stanza, "pubsub",
|
||||
"xmlns", "http://jabber.org/protocol/pubsub"
|
||||
);
|
||||
|
|
@ -425,10 +427,15 @@ IQSet(ParseeData *args, XMLElement *stanza, XMPPThread *thr)
|
|||
}
|
||||
#undef DISCO
|
||||
|
||||
void IQStanza(ParseeData *args, XMLElement *stanza, XMPPThread *thr)
|
||||
void
|
||||
IQStanza(ParseeData *args, XMLElement *stanza, XMPPThread *thr)
|
||||
{
|
||||
char *type;
|
||||
type = HashMapGet(stanza->attrs, "type");
|
||||
char *type = HashMapGet(stanza->attrs, "type");
|
||||
|
||||
if (PEPManagerHandle(thr->info->pep_manager, stanza))
|
||||
{
|
||||
return;
|
||||
}
|
||||
#define OnType(ctyp, callback) do \
|
||||
{ \
|
||||
if (StrEquals(type, #ctyp)) \
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ MessageStanza(ParseeData *args, XMLElement *stanza, XMPPThread *thr)
|
|||
XMLElement *reactions = NULL;
|
||||
XMLElement *body = NULL;
|
||||
XMLElement *data = NULL;
|
||||
XMLElement *event = NULL;
|
||||
|
||||
char *to, *room, *from, *from_matrix, *decode_from;
|
||||
char *mroom_id = NULL;
|
||||
|
|
@ -64,25 +63,7 @@ MessageStanza(ParseeData *args, XMLElement *stanza, XMPPThread *thr)
|
|||
}
|
||||
body = XMLookForUnique(stanza, "body");
|
||||
|
||||
event = XMLookForTKV(stanza, "event",
|
||||
"xmlns", "http://jabber.org/protocol/pubsub#event"
|
||||
);
|
||||
if (event)
|
||||
{
|
||||
size_t i;
|
||||
XMLElement *items =
|
||||
XMLookForTKV(event, "items", "node", "urn:xmpp:avatar:metadata");
|
||||
if (items)
|
||||
{
|
||||
for (i = 0; i < ArraySize(items->children); i++)
|
||||
{
|
||||
ManageProfileItem(
|
||||
args, ArrayGet(items->children, i),
|
||||
stanza, thr
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
PEPManagerHandle(thr->info->pep_manager, stanza);
|
||||
|
||||
#define CHAT_STATES "http://jabber.org/protocol/chatstates"
|
||||
if (XMLookForTKV(stanza, "composing", "xmlns", CHAT_STATES))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue