Software /
code /
prosody
Changeset
8660:3b54f8472b51
MUC: Return error if unable to keep track of room due to storage failure
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 07 Mar 2018 17:53:52 +0100 |
parents | 8659:4006755c1097 |
children | 8661:7fc0784491ef |
files | plugins/muc/mod_muc.lua |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/muc/mod_muc.lua Fri Mar 16 21:59:41 2018 +0100 +++ b/plugins/muc/mod_muc.lua Wed Mar 07 17:53:52 2018 +0100 @@ -253,8 +253,12 @@ end end); -module:hook("muc-room-created", function(event) - track_room(event.room); +module:hook("muc-room-pre-create", function(event) + local origin, stanza = event.origin, event.stanza; + if not track_room(event.room) then + origin.send(st.error_reply(stanza, "wait", "resource-constraint")); + return true; + end end, -1000); module:hook("muc-room-destroyed",function(event)