aboutsummaryrefslogtreecommitdiffstats
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
commita86fdfdc5674ef5a653dbea6b4a1828a9e879dec (patch)
tree03a335a8b268031cb9cc39db2cb59d45fbb39708
parent026bb9f3598c816b06233ba417dc9d7ca876a8eb (diff)
downloadprosody-a86fdfdc5674ef5a653dbea6b4a1828a9e879dec.tar.gz
prosody-a86fdfdc5674ef5a653dbea6b4a1828a9e879dec.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.
-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;