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) ?
--- 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;
};