From 9e34ffe665f39ca0f084067a9da13d153c7abaee Mon Sep 17 00:00:00 2001 From: LDA Date: Tue, 23 Jul 2024 18:36:30 +0200 Subject: [PATCH] [MOD] Use
, be a little more stringent on oID

---
 src/Main.c                  | 2 +-
 src/XEP-0393.c              | 8 ++------
 src/XMPPThread/Bridged.c    | 2 +-
 src/XMPPThread/PEPs/VCard.c | 7 ++++++-
 4 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/src/Main.c b/src/Main.c
index 66479fc..674ec28 100644
--- a/src/Main.c
+++ b/src/Main.c
@@ -77,7 +77,7 @@ Main(void)
     ParseeInitialiseJIDTable();
     ParseeInitialiseOIDTable();
     ParseeInitialiseHeadTable();
-    
+
     Log(LOG_NOTICE, "Setting up local Matrix user...");
     ASRegisterUser(parsee_conf, parsee_conf->sender_localpart);
 
diff --git a/src/XEP-0393.c b/src/XEP-0393.c
index 9616981..a53067b 100644
--- a/src/XEP-0393.c
+++ b/src/XEP-0393.c
@@ -280,20 +280,16 @@ XEP393ToXMLString(XEP393Element *xepd)
 
     Stream *writer;
     char *ret = NULL;
-    size_t i;
     if (!xepd)
     {
         return NULL;
     }
 
-    root = XMLCreateTag("ROOT");
+    root = XMLCreateTag("pre");
     ShoveXML(xepd, root);
 
     writer = StrStreamWriter(&ret);
-    for (i = 0; i < ArraySize(root->children); i++)
-    {
-        XMLEncode(writer, ArrayGet(root->children, i));
-    }
+    XMLEncode(writer, root);
     XMLFreeElement(root);
     StreamFlush(writer);
     StreamClose(writer);
diff --git a/src/XMPPThread/Bridged.c b/src/XMPPThread/Bridged.c
index f14732b..ded845f 100644
--- a/src/XMPPThread/Bridged.c
+++ b/src/XMPPThread/Bridged.c
@@ -211,7 +211,7 @@ ParseeGetBridgedUserI(ParseeData *data, XMLElement *stanza, char *force)
     if (!is_chat)
     {
         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)
diff --git a/src/XMPPThread/PEPs/VCard.c b/src/XMPPThread/PEPs/VCard.c
index 096b2d0..a57c948 100644
--- a/src/XMPPThread/PEPs/VCard.c
+++ b/src/XMPPThread/PEPs/VCard.c
@@ -74,7 +74,12 @@ PEPVCardEvent(PEPManager *m, XMLElement *stanza, XMLElement *item)
                 AddURIField(vcard, "url", REPOSITORY);
                 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
             {