diff options
author | Kim Alvefur <zash@zash.se> | 2021-12-08 16:40:51 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-12-08 16:40:51 +0100 |
commit | 3ae5d13641715b2c7941351a7fc8ff0153db4cef (patch) | |
tree | 997a0bfd4ddba2cd44f05d526bf2b2f8895e3a0d /plugins/muc | |
parent | 96b6f68b237669826e9c39d9216f176f12b78fd3 (diff) | |
download | prosody-3ae5d13641715b2c7941351a7fc8ff0153db4cef.tar.gz prosody-3ae5d13641715b2c7941351a7fc8ff0153db4cef.zip |
MUC: Return a friendly textual error when trying to speak without voice
I spend several minutes confused over where the bug was until I
remembered I had set myself as visitor in the previous debug session.
This would have helped.
Diffstat (limited to 'plugins/muc')
-rw-r--r-- | plugins/muc/muc.lib.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index c65ff9c7..c146255a 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -1218,7 +1218,8 @@ module:hook("muc-occupant-groupchat", function(event) 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")); + event.origin.send(st.error_reply(event.stanza, "auth", "forbidden", + "You do not currently have permission to speak in this chat")); return true; end end, 50); |