comparison mod_http_muc_log/mod_http_muc_log.lua @ 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 ed5abb8b8fa8
children d4b0a995e5e3 85882735fd33
comparison
equal deleted inserted replaced
4992:ed5abb8b8fa8 4993:f36d15107c15
387 end 387 end
388 end 388 end
389 end 389 end
390 390
391 -- XEP-0461: Message Replies 391 -- XEP-0461: Message Replies
392 local reply = item:get_child("reply", "urn:xmpp:reply:0"); 392 local reply = item:find("{urn:xmpp:reply:0}reply@id");
393 393
394 if body or verb or oob then 394 if body or verb or oob then
395 local line = { 395 local line = {
396 message_id = message_id; 396 message_id = message_id;
397 archive_id = archive_id; 397 archive_id = archive_id;
403 lang = lang; 403 lang = lang;
404 nick = nick; 404 nick = nick;
405 st_name = item.name; 405 st_name = item.name;
406 st_type = item.attr.type; 406 st_type = item.attr.type;
407 edit = edit; 407 edit = edit;
408 reply = reply and reply.attr.id; 408 reply = reply;
409 -- COMPAT 409 -- COMPAT
410 key = archive_id; 410 key = archive_id;
411 }; 411 };
412 if oob then 412 if oob then
413 line.oob = { 413 line.oob = {