mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-08-06 08:36:55 +02:00
Update to 2024-07-22 23:00
This commit is contained in:
15
roles/jitsi/files/prosody/modules/mod_room_destroy.lua
Normal file
15
roles/jitsi/files/prosody/modules/mod_room_destroy.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
-- Handle room destroy requests it such a way that it can be suppressed by other
|
||||
-- modules that handle room lifecycle and wish to keep the room alive.
|
||||
|
||||
function handle_room_destroy(event)
|
||||
local room = event.room;
|
||||
local reason = event.reason;
|
||||
local caller = event.caller;
|
||||
|
||||
module:log('info', 'Destroying room %s (requested by %s)', room.jid, caller);
|
||||
room:set_persistent(false);
|
||||
room:destroy(nil, reason);
|
||||
end
|
||||
|
||||
module:hook_global("maybe-destroy-room", handle_room_destroy, -1);
|
||||
module:log('info', 'loaded');
|
Reference in New Issue
Block a user