mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 19:55:10 +00:00
[ADD/WIP] Editing support XMPP->Matrix
This commit is contained in:
parent
771c3271ad
commit
ae740878c8
13 changed files with 249 additions and 106 deletions
|
|
@ -199,3 +199,38 @@ XMPPIsParseeStanza(XMLElement *stanza)
|
|||
|
||||
return !!XMLookForUnique(stanza, "x-parsee");
|
||||
}
|
||||
|
||||
|
||||
char *
|
||||
XMPPGetStanzaID(XMLElement *stanza)
|
||||
{
|
||||
XMLElement *stanza_id;
|
||||
if (!stanza)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
stanza_id = XMLookForTKV(stanza, "stanza-id", "xmlns", "urn:xmpp:sid:0");
|
||||
return stanza_id ? HashMapGet(stanza_id->attrs, "id") : NULL;
|
||||
}
|
||||
char *
|
||||
XMPPGetOriginID(XMLElement *stanza)
|
||||
{
|
||||
XMLElement *origin_id;
|
||||
if (!stanza)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
origin_id = XMLookForTKV(stanza, "origin-id", "xmlns", "urn:xmpp:sid:0");
|
||||
return origin_id ? HashMapGet(origin_id->attrs, "id") : NULL;
|
||||
}
|
||||
char *
|
||||
XMPPGetReplacedID(XMLElement *stanza)
|
||||
{
|
||||
XMLElement *replace = XMLookForTKV(
|
||||
stanza, "replace",
|
||||
"xmlns", "urn:xmpp:message-correct:0"
|
||||
);
|
||||
return replace ? HashMapGet(replace->attrs, "id") : NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue