# HG changeset patch # User Kim Alvefur # Date 1660606765 -7200 # Node ID b17d63ef5bdfca3cb90ff5c5362a71cfe4126cc1 # Parent d55b10878e439e0dfee50b86d4eb2aa47846a13d 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 diff -r d55b10878e43 -r b17d63ef5bdf mod_http_muc_log/mod_http_muc_log.lua --- 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);