aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-03-09 18:22:38 +0100
committerKim Alvefur <zash@zash.se>2018-03-09 18:22:38 +0100
commit4103947f8ad91c618c5273fbc4d3530a909d15af (patch)
tree232d1d22166f89ebf94c5193766f4dc2f332a333
parent76db204ec0e3922de2cef6a9bc5d6aa0516946e2 (diff)
downloadprosody-4103947f8ad91c618c5273fbc4d3530a909d15af.tar.gz
prosody-4103947f8ad91c618c5273fbc4d3530a909d15af.zip
MUC: Move something into empty if branch
-rw-r--r--plugins/muc/muc.lib.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index 605de498..7c3d3af9 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -480,11 +480,10 @@ function room_mt:handle_normal_presence(origin, stanza)
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);