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.
--- 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;