# HG changeset patch # User Kim Alvefur # Date 1520616158 -3600 # Node ID ca40f9a5751a37909160f96d6d252b0ce7007d29 # Parent d6373a378b73b47e5bba9efb988b03c9d8c05e48 MUC: Move something into empty if branch diff -r d6373a378b73 -r ca40f9a5751a plugins/muc/muc.lib.lua --- a/plugins/muc/muc.lib.lua Wed Apr 11 15:52:13 2018 +0200 +++ b/plugins/muc/muc.lib.lua Fri Mar 09 18:22:38 2018 +0100 @@ -480,11 +480,10 @@ local real_jid = stanza.attr.from; local bare_jid = jid_bare(real_jid); local orig_occupant = self:get_occupant_by_real_jid(real_jid); - if type == "unavailable" and orig_occupant == nil then return true; end -- Unavailable from someone not in the room local is_first_dest_session; local dest_occupant; - if type == "unavailable" then -- luacheck: ignore 542 - -- FIXME Why the empty if branch? + if type == "unavailable" then + if orig_occupant == nil then return true; end -- Unavailable from someone not in the room -- dest_occupant = nil elseif orig_occupant and orig_occupant.nick == stanza.attr.to then -- Just a presence update log("debug", "presence update for %s from session %s", orig_occupant.nick, real_jid);