Software /
code /
prosody-modules
Changeset
4993:f36d15107c15
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) ?
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 16 Aug 2022 01:45:28 +0200 |
parents | 4992:ed5abb8b8fa8 |
children | 4994:cce12a660b98 |
files | mod_http_muc_log/mod_http_muc_log.lua |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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; };