aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2019-02-04 09:27:43 +0000
committerMatthew Wild <mwild1@gmail.com>2019-02-04 09:27:43 +0000
commitda3f688d798fc25ed43085ba2fa1d54bb1978eb1 (patch)
treedf26b9fefcb965777447022c7b1eae432fcb001f /plugins
parent6d84bd44ba3a8bde48580b0f772e8278969af5cc (diff)
downloadprosody-da3f688d798fc25ed43085ba2fa1d54bb1978eb1.tar.gz
prosody-da3f688d798fc25ed43085ba2fa1d54bb1978eb1.zip
MUC: Add error message to error bounces when not joined to room
Diffstat (limited to 'plugins')
-rw-r--r--plugins/muc/muc.lib.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index ef2054b1..9648ea78 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -727,7 +727,7 @@ function room_mt:handle_iq_to_occupant(origin, stanza)
else -- Type is "get" or "set"
local current_nick = self:get_occupant_jid(from);
if not current_nick then
- origin.send(st.error_reply(stanza, "cancel", "not-acceptable"));
+ origin.send(st.error_reply(stanza, "cancel", "not-acceptable", "You are not currently connected to this chat"));
return true;
end
if not occupant then -- recipient not in room
@@ -760,7 +760,7 @@ function room_mt:handle_message_to_occupant(origin, stanza)
local type = stanza.attr.type;
if not current_nick then -- not in room
if type ~= "error" then
- origin.send(st.error_reply(stanza, "cancel", "not-acceptable"));
+ origin.send(st.error_reply(stanza, "cancel", "not-acceptable", "You are not currently connected to this chat"));
end
return true;
end
@@ -1057,7 +1057,7 @@ end
module:hook("muc-occupant-groupchat", function(event)
local role_rank = valid_roles[event.occupant and event.occupant.role or "none"];
if role_rank <= valid_roles.none then
- event.origin.send(st.error_reply(event.stanza, "cancel", "not-acceptable"));
+ event.origin.send(st.error_reply(event.stanza, "cancel", "not-acceptable", "You are not currently connected to this chat"));
return true;
elseif role_rank <= valid_roles.visitor then
event.origin.send(st.error_reply(event.stanza, "auth", "forbidden"));