mod_http_muc_log: Use XEP-0359 ID if available
Clients apparently prefer this over message@id for reasons.
Only used internally to find items for message edits
--- a/mod_http_muc_log/mod_http_muc_log.lua Tue Aug 16 01:34:27 2022 +0200
+++ b/mod_http_muc_log/mod_http_muc_log.lua Tue Aug 16 01:39:25 2022 +0200
@@ -312,6 +312,9 @@
local verb = nil;
local lang = body_tag and body_tag.attr["xml:lang"] or item.attr["xml:lang"];
+ -- XEP-0359: Unique and Stable Stanza IDs
+ local message_id = item:find("{urn:xmpp:sid:0}origin-id@id") or item.attr.id;
+
if subject then
verb, body = "set the topic to", subject;
elseif body and body:sub(1,4) == "/me " then
@@ -389,7 +392,7 @@
if body or verb or oob then
local line = {
- message_id = item.attr.id;
+ message_id = message_id;
archive_id = archive_id;
datetime = datetime.datetime(when);
time = datetime.time(when);