aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-03-07 17:53:52 +0100
committerKim Alvefur <zash@zash.se>2018-03-07 17:53:52 +0100
commit843370587d38b05018895b65cfbf51205f7d51ac (patch)
tree996e578a15fc2b80892f0444e708fce5b6442393 /plugins
parent907b1523fdd2289c409f30df768198ecd97cab1a (diff)
downloadprosody-843370587d38b05018895b65cfbf51205f7d51ac.tar.gz
prosody-843370587d38b05018895b65cfbf51205f7d51ac.zip
MUC: Return error if unable to keep track of room due to storage failure
Diffstat (limited to 'plugins')
-rw-r--r--plugins/muc/mod_muc.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/muc/mod_muc.lua b/plugins/muc/mod_muc.lua
index a3c6cb81..6ba0ffb5 100644
--- a/plugins/muc/mod_muc.lua
+++ b/plugins/muc/mod_muc.lua
@@ -253,8 +253,12 @@ module:hook("host-disco-items", function(event)
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)