# HG changeset patch # User Matthew Wild # Date 1717088107 -3600 # Node ID db5128d1a16c6e022810ef6a0ccc64610d651151 # Parent d3610fb965d673d11d4cb3b0f94230245f6d99d9 mod_report_forward: Fix traceback when reporting a specific message (thanks singpolyma) diff -r d3610fb965d6 -r db5128d1a16c mod_report_forward/mod_report_forward.lua --- a/mod_report_forward/mod_report_forward.lua Fri May 24 18:30:47 2024 -0500 +++ b/mod_report_forward/mod_report_forward.lua Thu May 30 17:55:07 2024 +0100 @@ -95,7 +95,7 @@ local report = st.clone(event.report); report:text_tag("jid", reported_jid, { xmlns = "urn:xmpp:jid:0" }); - local reported_message_id = report:get_child_with_attr( + local reported_message_el = report:get_child_with_attr( "stanza-id", "urn:xmpp:sid:0", "by", @@ -104,8 +104,8 @@ ); local reported_message, reported_message_time, reported_message_with; - if reported_message_id then - reported_message, reported_message_time, reported_message_with = archive:get(reporter_username, reported_message_id); + if reported_message_el then + reported_message, reported_message_time, reported_message_with = archive:get(reporter_username, reported_message_el.attr.id); if jid.bare(reported_message_with) ~= event.jid then reported_message = nil; end