--- a/plugins/muc/muc.lib.lua Mon Mar 06 15:31:21 2017 +0100
+++ b/plugins/muc/muc.lib.lua Mon Mar 06 15:35:02 2017 +0100
@@ -517,7 +517,9 @@
local nick_changed = dest_occupant and orig_nick ~= dest_occupant.nick;
-- Check for nick conflicts
- if dest_occupant ~= nil and not is_first_dest_session and bare_jid ~= jid_bare(dest_occupant.bare_jid) then -- new nick or has different bare real jid
+ if dest_occupant ~= nil and not is_first_dest_session
+ and bare_jid ~= jid_bare(dest_occupant.bare_jid) then
+ -- new nick or has different bare real jid
log("debug", "%s couldn't join due to nick conflict: %s", real_jid, dest_occupant.nick);
local reply = st.error_reply(stanza, "cancel", "conflict"):up();
reply.tags[1].attr.code = "409";