Software / code / prosody
Diff
plugins/muc/register.lib.lua @ 12029:631b2afa7bc1
MUC: Remove <{muc}x> tags in some errors
Including the payload of the stanza that caused the error is optional
and we're generally not doing it anywhere else.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Wed, 08 Dec 2021 21:55:25 +0100 |
| parent | 12028:9ab202e942f5 |
| child | 12977:74b9e05af71e |
line wrap: on
line diff
--- a/plugins/muc/register.lib.lua Wed Dec 08 21:06:16 2021 +0100 +++ b/plugins/muc/register.lib.lua Wed Dec 08 21:55:25 2021 +0100 @@ -85,7 +85,7 @@ 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 @@ 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