# HG changeset patch # User Matthew Wild # Date 1593688715 -3600 # Node ID 072366857d7927ac711f5ea087dfe7d4344df4e4 # Parent cf9a1c7d558d675ca25bd8aa42637d6d4dfd6eca mod_muc_rai: Fix to correctly extract the archive id diff -r cf9a1c7d558d -r 072366857d79 mod_muc_rai/mod_muc_rai.lua --- a/mod_muc_rai/mod_muc_rai.lua Thu Jul 02 12:17:53 2020 +0100 +++ b/mod_muc_rai/mod_muc_rai.lua Thu Jul 02 12:18:35 2020 +0100 @@ -211,11 +211,11 @@ module:hook("muc-broadcast-message", function (event) local room, stanza = event.room, event.stanza; - local archive_id = stanza:get_child_text("stanza-id", "urn:xmpp:sid:0"); - if archive_id then + local archive_id = stanza:get_child("stanza-id", "urn:xmpp:sid:0"); + if archive_id and archive_id.attr.id then -- Remember the id of the last message so we can compare it -- to the per-user marker (managed by mod_muc_markers) - update_room_activity(room.jid, archive_id); + update_room_activity(room.jid, archive_id.attr.id); -- Notify any users that need to be notified notify_interested_users(room.jid); end