Mercurial > prosody-hg
comparison plugins/muc/mod_muc.lua @ 8180:67a9ff352271
MUC: Include a human-readable message when denying room creation because of restrict_room_creation
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Thu, 06 Jul 2017 11:22:16 +0200 |
| parents | c5fa7fe3fd79 |
| children | 43d50a957463 |
comparison
equal
deleted
inserted
replaced
| 8179:c5fa7fe3fd79 | 8180:67a9ff352271 |
|---|---|
| 249 local user_jid = stanza.attr.from; | 249 local user_jid = stanza.attr.from; |
| 250 if not is_admin(user_jid) and not ( | 250 if not is_admin(user_jid) and not ( |
| 251 restrict_room_creation == "local" and | 251 restrict_room_creation == "local" and |
| 252 select(2, jid_split(user_jid)) == host_suffix | 252 select(2, jid_split(user_jid)) == host_suffix |
| 253 ) then | 253 ) then |
| 254 origin.send(st.error_reply(stanza, "cancel", "not-allowed")); | 254 origin.send(st.error_reply(stanza, "cancel", "not-allowed", "Room creation is restricted")); |
| 255 return true; | 255 return true; |
| 256 end | 256 end |
| 257 end); | 257 end); |
| 258 end | 258 end |
| 259 end | 259 end |
