# HG changeset patch # User Kim Alvefur # Date 1476559003 -7200 # Node ID eb456fd639d258a8b8c6fd743dde4b1e5cb4f36c # Parent c728b2f77c7c6cf0171121889e6a8675c5094c03 mod_track_muc_joins: Check if the map of directed presence exists earlier (fixes traceback due to precedence error) (thanks Link Mauve) diff -r c728b2f77c7c -r eb456fd639d2 mod_track_muc_joins/mod_track_muc_joins.lua --- a/mod_track_muc_joins/mod_track_muc_joins.lua Thu Oct 13 18:58:53 2016 +0100 +++ b/mod_track_muc_joins/mod_track_muc_joins.lua Sat Oct 15 21:16:43 2016 +0200 @@ -6,6 +6,7 @@ local stanza = event.stanza; local session = sessions[stanza.attr.to]; if not session then return end; + if not session.directed then return end -- hasn't sent presence yet local log = session.log or module._log; local muc_x = stanza:get_child("x", "http://jabber.org/protocol/muc#user"); @@ -24,7 +25,7 @@ return; end - if joined and not session.directed or not session.directed[from_jid] then + if joined and not session.directed[from_jid] then return; -- Never sent presence there, can't be a MUC join end