mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 21:35:10 +00:00
[MOD/WIP] Continue XEP-0421
This commit is contained in:
parent
63c1bc819e
commit
c9f8d69802
8 changed files with 120 additions and 66 deletions
|
|
@ -180,7 +180,7 @@ IQResult(ParseeData *args, XMLElement *stanza, XMPPThread *thr)
|
|||
mxc = ASUpload(args->config, datastream, length, "image/png");
|
||||
|
||||
jid = ParseeLookupJID(from);
|
||||
from_matrix = ParseeEncodeJID(args->config, jid, false);
|
||||
from_matrix = ParseeGetBridgedUser(args, stanza);
|
||||
ASSetAvatar(args->config, from_matrix, mxc);
|
||||
|
||||
JsonValueFree(JsonSet(
|
||||
|
|
|
|||
|
|
@ -148,11 +148,6 @@ MessageStanza(ParseeData *args, XMLElement *stanza, XMPPThread *thr)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (ServerHasXEP421(args, HashMapGet(stanza->attrs, "from")))
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
to = ParseeDecodeMXID(HashMapGet(stanza->attrs, "to"));
|
||||
decode_from = ParseeLookupJID(from);
|
||||
from_matrix = ParseeEncodeJID(args->config, decode_from, true);
|
||||
|
|
|
|||
|
|
@ -76,8 +76,7 @@ PresenceStanza(ParseeData *args, XMLElement *stanza)
|
|||
char *from = NULL;
|
||||
char *type = HashMapGet(stanza->attrs, "type");
|
||||
char *room = ParseeGetBridgedRoom(args, stanza);
|
||||
char *decode_from = ParseeLookupJID(oid);
|
||||
char *real_matrix = ParseeDecodeMXID(decode_from);
|
||||
char *decode_from, *real_matrix;
|
||||
char *matrix_user_pl = ParseeEncodeJID(args->config, trim, false);
|
||||
char *affiliation = HashMapGet(item->attrs, "affiliation");
|
||||
int power_level = 0;
|
||||
|
|
@ -85,10 +84,18 @@ PresenceStanza(ParseeData *args, XMLElement *stanza)
|
|||
|
||||
Free(trim);
|
||||
|
||||
if (jid)
|
||||
{
|
||||
ParseePushJIDTable(oid, jid);
|
||||
}
|
||||
decode_from = ParseeLookupJID(oid);
|
||||
real_matrix = ParseeDecodeMXID(decode_from);
|
||||
|
||||
if (!real_matrix || *real_matrix != '@')
|
||||
{
|
||||
Free(real_matrix);
|
||||
real_matrix = ParseeEncodeJID(args->config, decode_from, false);
|
||||
/*real_matrix = ParseeEncodeJID(args->config, decode_from, false);*/
|
||||
real_matrix = ParseeGetBridgedUserI(args, stanza, oid);
|
||||
}
|
||||
|
||||
if (StrEquals(affiliation, "owner"))
|
||||
|
|
@ -163,10 +170,6 @@ PresenceStanza(ParseeData *args, XMLElement *stanza)
|
|||
}
|
||||
}
|
||||
|
||||
if (jid)
|
||||
{
|
||||
ParseePushJIDTable(oid, jid);
|
||||
}
|
||||
|
||||
Free(from);
|
||||
Free(decode_from);
|
||||
|
|
@ -179,8 +182,7 @@ PresenceStanza(ParseeData *args, XMLElement *stanza)
|
|||
{
|
||||
XMLElement *status_data = ArrayGet(status->children, 0);
|
||||
char *decode_from = ParseeLookupJID(oid);
|
||||
char *trimmed = ParseeTrimJID(decode_from);
|
||||
char *from_matrix = ParseeEncodeJID(args->config, trimmed, false);
|
||||
char *from_matrix = ParseeGetBridgedUser(args, stanza);
|
||||
char *status_str = NULL;
|
||||
if (status_data)
|
||||
{
|
||||
|
|
@ -199,7 +201,6 @@ PresenceStanza(ParseeData *args, XMLElement *stanza)
|
|||
|
||||
Free(decode_from);
|
||||
Free(from_matrix);
|
||||
Free(trimmed);
|
||||
}
|
||||
if (vc)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue