Software /
code /
prosody
Comparison
plugins/muc/mod_muc.lua @ 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 |
parent | 8659:4006755c1097 |
child | 8661:7fc0784491ef |
comparison
equal
deleted
inserted
replaced
8659:4006755c1097 | 8660:3b54f8472b51 |
---|---|
251 end | 251 end |
252 end | 252 end |
253 end | 253 end |
254 end); | 254 end); |
255 | 255 |
256 module:hook("muc-room-created", function(event) | 256 module:hook("muc-room-pre-create", function(event) |
257 track_room(event.room); | 257 local origin, stanza = event.origin, event.stanza; |
258 if not track_room(event.room) then | |
259 origin.send(st.error_reply(stanza, "wait", "resource-constraint")); | |
260 return true; | |
261 end | |
258 end, -1000); | 262 end, -1000); |
259 | 263 |
260 module:hook("muc-room-destroyed",function(event) | 264 module:hook("muc-room-destroyed",function(event) |
261 local room = event.room; | 265 local room = event.room; |
262 forget_room(room); | 266 forget_room(room); |