aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-06-26 01:03:51 +0200
committerKim Alvefur <zash@zash.se>2017-06-26 01:03:51 +0200
commitf8817ce9c64e90d89de5c55a1cf1296e8ed3747e (patch)
treebede8658ec64e407f544a7c616228dae5dae9316 /plugins/muc
parenta8ab13b47364b6458b93cbf16ef579e183289d5a (diff)
downloadprosody-f8817ce9c64e90d89de5c55a1cf1296e8ed3747e.tar.gz
prosody-f8817ce9c64e90d89de5c55a1cf1296e8ed3747e.zip
MUC: Only send status code 307 to the user being kicked, not everyone (fixes #939)
Diffstat (limited to 'plugins/muc')
-rw-r--r--plugins/muc/muc.lib.lua13
1 files changed, 10 insertions, 3 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index 8592e225..a20f3b26 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -349,8 +349,11 @@ function room_mt:handle_kickable(origin, stanza) -- luacheck: ignore 212
occupant:set_session(real_jid, st.presence({type="unavailable"})
:tag('status'):text(error_message));
self:save_occupant(occupant);
- local x = st.stanza("x", {xmlns = "http://jabber.org/protocol/muc#user";})
- :tag("status", {code = "307"})
+ local x = {
+ base = st.stanza("x", {xmlns = "http://jabber.org/protocol/muc#user";});
+ self = st.stanza("x", {xmlns = "http://jabber.org/protocol/muc#user";})
+ :tag("status", {code = "307"});
+ };
self:publicise_occupant_status(occupant, x);
if occupant.jid == real_jid then -- Was last session
module:fire_event("muc-occupant-left", {room = self; nick = occupant.nick; occupant = occupant;});
@@ -1298,7 +1301,11 @@ function room_mt:set_role(actor, occupant_jid, role, reason)
local x = st.stanza("x", {xmlns = "http://jabber.org/protocol/muc#user"});
if not role then
- x:tag("status", {code = "307"}):up();
+ x = {
+ base = x;
+ self = st.stanza("x", {xmlns = "http://jabber.org/protocol/muc#user"})
+ :tag("status", {code = "307"}):up();
+ };
end
occupant.role = role;
self:save_occupant(occupant);