aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/muc/members_only.lib.lua2
-rw-r--r--plugins/muc/muc.lib.lua4
-rw-r--r--plugins/muc/password.lib.lua2
-rw-r--r--plugins/muc/register.lib.lua4
-rw-r--r--spec/scansion/muc_register.scs2
-rw-r--r--spec/scansion/muc_show_offline.scs2
6 files changed, 6 insertions, 10 deletions
diff --git a/plugins/muc/members_only.lib.lua b/plugins/muc/members_only.lib.lua
index 64587726..b10dc120 100644
--- a/plugins/muc/members_only.lib.lua
+++ b/plugins/muc/members_only.lib.lua
@@ -122,7 +122,7 @@ module:hook("muc-occupant-pre-join", function(event)
local affiliation = room:get_affiliation(stanza.attr.from);
if valid_affiliations[affiliation or "none"] <= valid_affiliations.none then
local reply = st.error_reply(stanza, "auth", "registration-required", nil, room.jid):up();
- event.origin.send(reply:tag("x", {xmlns = "http://jabber.org/protocol/muc"}));
+ event.origin.send(reply);
return true;
end
end
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index 5e39d317..01cf22f6 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -449,7 +449,7 @@ module:hook("muc-occupant-pre-join", function(event)
local affiliation = room:get_affiliation(stanza.attr.from);
if affiliation == "outcast" then
local reply = st.error_reply(stanza, "auth", "forbidden", nil, room.jid):up();
- event.origin.send(reply:tag("x", {xmlns = "http://jabber.org/protocol/muc"}));
+ event.origin.send(reply);
return true;
end
end, -10);
@@ -691,7 +691,7 @@ function room_mt:handle_normal_presence(origin, stanza)
-- new nick or has different bare real jid
log("debug", "%s couldn't join due to nick conflict: %s", real_jid, dest_occupant.nick);
local reply = st.error_reply(stanza, "cancel", "conflict", nil, self.jid):up();
- origin.send(reply:tag("x", {xmlns = "http://jabber.org/protocol/muc"}));
+ origin.send(reply);
return true;
end
diff --git a/plugins/muc/password.lib.lua b/plugins/muc/password.lib.lua
index b3004eb4..dd3cb658 100644
--- a/plugins/muc/password.lib.lua
+++ b/plugins/muc/password.lib.lua
@@ -51,7 +51,7 @@ module:hook("muc-occupant-pre-join", function(event)
local from, to = stanza.attr.from, stanza.attr.to;
module:log("debug", "%s couldn't join due to invalid password: %s", from, to);
local reply = st.error_reply(stanza, "auth", "not-authorized", nil, room.jid):up();
- event.origin.send(reply:tag("x", {xmlns = "http://jabber.org/protocol/muc"}));
+ event.origin.send(reply);
return true;
end
end, -20);
diff --git a/plugins/muc/register.lib.lua b/plugins/muc/register.lib.lua
index 7a3c5666..84045f33 100644
--- a/plugins/muc/register.lib.lua
+++ b/plugins/muc/register.lib.lua
@@ -85,7 +85,7 @@ local function enforce_nick_policy(event)
if reserved_by and reserved_by ~= jid_bare(stanza.attr.from) then
module:log("debug", "%s attempted to use nick %s reserved by %s", stanza.attr.from, requested_nick, reserved_by);
local reply = st.error_reply(stanza, "cancel", "conflict", nil, room.jid):up();
- origin.send(reply:tag("x", {xmlns = "http://jabber.org/protocol/muc"}));
+ origin.send(reply);
return true;
end
@@ -98,7 +98,7 @@ local function enforce_nick_policy(event)
elseif event.dest_occupant.nick ~= jid_bare(event.dest_occupant.nick) .. "/" .. nick then
module:log("debug", "Attempt by %s to join as %s, but their reserved nick is %s", stanza.attr.from, requested_nick, nick);
local reply = st.error_reply(stanza, "cancel", "not-acceptable", nil, room.jid):up();
- origin.send(reply:tag("x", {xmlns = "http://jabber.org/protocol/muc"}));
+ origin.send(reply);
return true;
end
end
diff --git a/spec/scansion/muc_register.scs b/spec/scansion/muc_register.scs
index 9fcce688..915a7325 100644
--- a/spec/scansion/muc_register.scs
+++ b/spec/scansion/muc_register.scs
@@ -180,7 +180,6 @@ Rosaline receives:
<error type='cancel' by='room@conference.localhost'>
<conflict xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
- <x xmlns='http://jabber.org/protocol/muc'/>
</presence>
# In a heated moment, Juliet unregisters from the room
@@ -291,7 +290,6 @@ Rosaline receives:
<error type='cancel' by='room@conference.localhost'>
<conflict xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
- <x xmlns='http://jabber.org/protocol/muc'/>
</presence>
# Juliet, however, quietly joins the room with success
diff --git a/spec/scansion/muc_show_offline.scs b/spec/scansion/muc_show_offline.scs
index 57b75ec7..c06a892d 100644
--- a/spec/scansion/muc_show_offline.scs
+++ b/spec/scansion/muc_show_offline.scs
@@ -185,7 +185,6 @@ Rosaline receives:
<error type='cancel' by='room@conference.localhost'>
<conflict xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
- <x xmlns='http://jabber.org/protocol/muc'/>
</presence>
# In a heated moment, Juliet unregisters from the room
@@ -296,7 +295,6 @@ Rosaline receives:
<error type='cancel' by='room@conference.localhost'>
<conflict xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
- <x xmlns='http://jabber.org/protocol/muc'/>
</presence>
# Juliet, however, quietly joins the room with success