From fafbcb7f137e6cc83c6cc658c115456feb89c442 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 12 Jul 2018 01:23:19 +0200 Subject: MUC: Simplify creation of <{muc}x> for room creation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It’s only sent to the creator so no need to have separate variants for different kinds of participants. --- plugins/muc/muc.lib.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'plugins') diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index f975fc69..9e51a068 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -439,14 +439,12 @@ function room_mt:handle_first_presence(origin, stanza) 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; -- cgit v1.2.3