MUC: Remove "server changed your nickname" status code, it gets into the wrong places
authorKim Alvefur <zash@zash.se>
Sat, 01 Oct 2016 23:20:58 +0200
changeset 7672 b332db1baf0b
parent 7671 96c6c25a51e1
child 7689 8d6f367bed8c
MUC: Remove "server changed your nickname" status code, it gets into the wrong places
plugins/muc/muc.lib.lua
--- a/plugins/muc/muc.lib.lua	Sat Oct 01 22:11:34 2016 +0200
+++ b/plugins/muc/muc.lib.lua	Sat Oct 01 23:20:58 2016 +0200
@@ -491,7 +491,6 @@
 		is_first_session = is_first_dest_session;
 		is_last_session = is_last_orig_session;
 	};
-	local orig_nick = dest_occupant and dest_occupant.nick;
 	if orig_occupant == nil then
 		event_name = "muc-occupant-pre-join";
 		event.occupant = dest_occupant;
@@ -504,7 +503,6 @@
 		event.dest_occupant = dest_occupant;
 	end
 	if module:fire_event(event_name, event) then return true; end
-	local nick_overridden = orig_nick 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
@@ -578,9 +576,6 @@
 		if orig_occupant == nil and self:get_whois() == "anyone" then
 			dest_x:tag("status", {code = "100"}):up();
 		end
-		if nick_overridden then
-			dest_x:tag("status", {code = "210"}):up();
-		end
 		self:save_occupant(dest_occupant);
 
 		if orig_occupant == nil or muc_x then