Software /
code /
prosody
Changeset
9819:11671a2e07a9 0.11
MUC: Add error message to error bounces when not joined to room
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 04 Feb 2019 09:27:43 +0000 |
parents | 9817:7aad9eb7f050 |
children | 9820:87a1742f928d 9821:7712488c8e49 |
files | plugins/muc/muc.lib.lua |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua Mon Jan 28 01:41:42 2019 +0100 +++ b/plugins/muc/muc.lib.lua Mon Feb 04 09:27:43 2019 +0000 @@ -727,7 +727,7 @@ 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 @@ 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 @@ 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"));