Software /
code /
prosody-modules
Diff
mod_track_muc_joins/mod_track_muc_joins.lua @ 2335:eb456fd639d2
mod_track_muc_joins: Check if the map of directed presence exists earlier (fixes traceback due to precedence error) (thanks Link Mauve)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 15 Oct 2016 21:16:43 +0200 |
parent | 2302:12249570352f |
child | 2339:443d9dae3216 |
line wrap: on
line diff
--- 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