aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-07-12 01:23:19 +0200
committerKim Alvefur <zash@zash.se>2018-07-12 01:23:19 +0200
commitfafbcb7f137e6cc83c6cc658c115456feb89c442 (patch)
tree03a335a8b268031cb9cc39db2cb59d45fbb39708 /plugins/muc
parentf509f546a3fbf6ef44ca5447ba9883fcd9c43dc0 (diff)
downloadprosody-fafbcb7f137e6cc83c6cc658c115456feb89c442.tar.gz
prosody-fafbcb7f137e6cc83c6cc658c115456feb89c442.zip
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.
Diffstat (limited to 'plugins/muc')
-rw-r--r--plugins/muc/muc.lib.lua6
1 files changed, 2 insertions, 4 deletions
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;