Software /
code /
prosody
Changeset
12026:f3b09b8445b3
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.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 08 Dec 2021 16:40:51 +0100 |
parents | 12025:6ed7fd28f5e3 |
children | 12027:5fb16f41f861 |
files | plugins/muc/muc.lib.lua |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua Tue Dec 07 21:43:36 2021 +0100 +++ b/plugins/muc/muc.lib.lua Wed Dec 08 16:40:51 2021 +0100 @@ -1218,7 +1218,8 @@ 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);