# HG changeset patch # User Kim Alvefur # Date 1660607128 -7200 # Node ID f36d15107c15056c5eca6592cbaf355dddfb1796 # Parent ed5abb8b8fa850aef47a2622a1c786bce0ef1456 mod_http_muc_log: Use stanza:find to save a few bytes Why don't we have a stanza:get_child_attr(name, namespace, attrname) ? diff -r ed5abb8b8fa8 -r f36d15107c15 mod_http_muc_log/mod_http_muc_log.lua --- a/mod_http_muc_log/mod_http_muc_log.lua Tue Aug 16 01:41:45 2022 +0200 +++ b/mod_http_muc_log/mod_http_muc_log.lua Tue Aug 16 01:45:28 2022 +0200 @@ -389,7 +389,7 @@ end -- XEP-0461: Message Replies - local reply = item:get_child("reply", "urn:xmpp:reply:0"); + local reply = item:find("{urn:xmpp:reply:0}reply@id"); if body or verb or oob then local line = { @@ -405,7 +405,7 @@ st_name = item.name; st_type = item.attr.type; edit = edit; - reply = reply and reply.attr.id; + reply = reply; -- COMPAT key = archive_id; };