[ADD/WIP] Temporary vCard avatard

Gajim still reacts weirdly.... also it leaks memory related to avatars,
so that sucks...
This commit is contained in:
LDA 2024-10-02 21:13:28 +02:00
commit d585134ce1
8 changed files with 43 additions and 27 deletions

View file

@ -78,6 +78,7 @@ GenerateAvatarData(ParseeData *data, char *mxid)
end:
Free(mime);
Free(out);
Free(mxc);
Free(b64);
return elem;
}
@ -395,7 +396,7 @@ IQGet(ParseeData *args, XMLElement *stanza, XMPPThread *thr)
char *to_matrix = ParseeGetBridgedUser(args, stanza);
char *name = ASGetName(args->config, NULL, to_matrix);
XMLElement *iqVCard;
Log(LOG_DEBUG, "vCard information GET for %s", to);
Log(LOG_DEBUG, "vCard information GET for %s (%s)", to, to_matrix);
if (!strncmp(to, "parsee@", 7))
{
@ -435,6 +436,9 @@ IQGet(ParseeData *args, XMLElement *stanza, XMPPThread *thr)
return;
}
Free(to_matrix);
to_matrix = ParseeDecodeMXID(to);
iqVCard = XMLCreateTag("iq");
XMLAddAttr(iqVCard, "from", to);
XMLAddAttr(iqVCard, "to", from);