MUC: Simplify creation of <{muc}x> for room creation
authorKim Alvefur <zash@zash.se>
Thu, 12 Jul 2018 01:23:19 +0200
changeset 9025 293ebfed71f7
parent 9024 548ba4090012
child 9026 ce461a67d2cc
MUC: Simplify creation of <{muc}x> for room creation It’s only sent to the creator so no need to have separate variants for different kinds of participants.
plugins/muc/muc.lib.lua
--- a/plugins/muc/muc.lib.lua	Wed Jul 11 11:58:25 2018 +0100
+++ b/plugins/muc/muc.lib.lua	Thu Jul 12 01:23:19 2018 +0200
@@ -439,14 +439,12 @@
 	if self:get_whois() == "anyone" then
 		dest_x:tag("status", {code = "100"}):up();
 	end
-	local self_x;
 	if nick_changed then
-		self_x = st.clone(dest_x);
-		self_x:tag("status", {code = "210"}):up();
+		dest_x:tag("status", {code = "210"}):up();
 	end
 	self:save_occupant(dest_occupant);
 
-	self:publicise_occupant_status(dest_occupant, {base = dest_x, self = self_x});
+	self:publicise_occupant_status(dest_occupant, dest_x);
 
 	module:fire_event("muc-occupant-joined", {
 		room = self;