[MOD] Use <pre>, be a little more stringent on oID

This commit is contained in:
LDA 2024-07-23 18:36:30 +02:00
commit 9e34ffe665
4 changed files with 10 additions and 9 deletions

View file

@ -77,7 +77,7 @@ Main(void)
ParseeInitialiseJIDTable(); ParseeInitialiseJIDTable();
ParseeInitialiseOIDTable(); ParseeInitialiseOIDTable();
ParseeInitialiseHeadTable(); ParseeInitialiseHeadTable();
Log(LOG_NOTICE, "Setting up local Matrix user..."); Log(LOG_NOTICE, "Setting up local Matrix user...");
ASRegisterUser(parsee_conf, parsee_conf->sender_localpart); ASRegisterUser(parsee_conf, parsee_conf->sender_localpart);

View file

@ -280,20 +280,16 @@ XEP393ToXMLString(XEP393Element *xepd)
Stream *writer; Stream *writer;
char *ret = NULL; char *ret = NULL;
size_t i;
if (!xepd) if (!xepd)
{ {
return NULL; return NULL;
} }
root = XMLCreateTag("ROOT"); root = XMLCreateTag("pre");
ShoveXML(xepd, root); ShoveXML(xepd, root);
writer = StrStreamWriter(&ret); writer = StrStreamWriter(&ret);
for (i = 0; i < ArraySize(root->children); i++) XMLEncode(writer, root);
{
XMLEncode(writer, ArrayGet(root->children, i));
}
XMLFreeElement(root); XMLFreeElement(root);
StreamFlush(writer); StreamFlush(writer);
StreamClose(writer); StreamClose(writer);

View file

@ -211,7 +211,7 @@ ParseeGetBridgedUserI(ParseeData *data, XMLElement *stanza, char *force)
if (!is_chat) if (!is_chat)
{ {
has_anon = ServerHasXEP421(data, xmpp_from); has_anon = ServerHasXEP421(data, xmpp_from);
is_anon = has_anon;// && StrEquals(xmpp_from, decode_from); is_anon = has_anon && StrEquals(xmpp_from, decode_from);
} }
if (is_anon || force) if (is_anon || force)

View file

@ -74,7 +74,12 @@ PEPVCardEvent(PEPManager *m, XMLElement *stanza, XMLElement *item)
AddURIField(vcard, "url", REPOSITORY); AddURIField(vcard, "url", REPOSITORY);
AddURIField(vcard, "url", "https://kappach.at/parsee"); AddURIField(vcard, "url", "https://kappach.at/parsee");
AddTextField(vcard, "note", "This is the Parsee user account."); AddTextField(vcard,
"note",
"This is the Parsee system account. " "\n"
"Admins may execute ad-hoc commands through this "
"account."
);
} }
else else
{ {