Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
fix(prosody): Order room-destroyed event.
damenchof4c61e4760f2
diff --git a/resources/prosody-plugins/mod_measure_message_count.lua b/resources/prosody-plugins/mod_measure_message_count.luaindex e27c58e246..45f607d8e4 100644--- a/resources/prosody-plugins/mod_measure_message_count.lua+++ b/resources/prosody-plugins/mod_measure_message_count.lua@@ -153,7 +153,7 @@ endmodule:hook('message/full', on_message); -- private messagesmodule:hook('message/bare', on_message); -- room messages-module:hook('muc-room-destroyed', room_destroyed, -1);+module:hook('muc-room-destroyed', room_destroyed, 1); -- prosody handles it at 0module:hook("muc-occupant-left", function(event)local occupant, room = event.occupant, event.room;local session = event.origin;diff --git a/resources/prosody-plugins/mod_muc_breakout_rooms.lua b/resources/prosody-plugins/mod_muc_breakout_rooms.luaindex 537f2cb9cd..ee02b0587f 100644--- a/resources/prosody-plugins/mod_muc_breakout_rooms.lua+++ b/resources/prosody-plugins/mod_muc_breakout_rooms.lua@@ -15,7 +15,6 @@-- muc_room_locking = false-- muc_room_default_public_jids = true---module:depends('room_destroy');-- we use async to detect Prosody 0.10 and earlier@@ -650,7 +649,7 @@ function process_main_muc_loaded(main_muc, host_module)module:log("info", "Hook to muc events on %s", main_muc_component_config);host_module:hook('muc-occupant-joined', on_occupant_joined);host_module:hook('muc-occupant-left', on_occupant_left);- host_module:hook('muc-room-destroyed', on_main_room_destroyed);+ host_module:hook('muc-room-destroyed', on_main_room_destroyed, 1); -- prosody handles it at 0end-- process or waits to process the main muc componentdiff --git a/resources/prosody-plugins/mod_muc_cleanup_backend_services.lua b/resources/prosody-plugins/mod_muc_cleanup_backend_services.luaindex 75471162c3..e9bc601fa5 100644--- a/resources/prosody-plugins/mod_muc_cleanup_backend_services.lua+++ b/resources/prosody-plugins/mod_muc_cleanup_backend_services.lua@@ -54,5 +54,4 @@ module:hook('muc-room-destroyed', function (event)room.empty_destroy_timer:stop();room.empty_destroy_timer = nil;end-end);-+end, 1); -- prosody handles it at 0diff --git a/resources/prosody-plugins/mod_muc_lobby_rooms.lua b/resources/prosody-plugins/mod_muc_lobby_rooms.luaindex 9f8a0076e0..bb99235355 100644--- a/resources/prosody-plugins/mod_muc_lobby_rooms.lua+++ b/resources/prosody-plugins/mod_muc_lobby_rooms.lua@@ -512,7 +512,7 @@ process_host_module(main_muc_component_config, function(host_module, host)if room._data.lobbyroom thendestroy_lobby_room(room, nil);end- end);+ end, 1); -- prosody handles it at 0host_module:hook('muc-disco#info', function (event)local room = event.room;if (room._data.lobbyroom and room:get_members_only()) thendiff --git a/resources/prosody-plugins/mod_muc_rate_limit.lua b/resources/prosody-plugins/mod_muc_rate_limit.luaindex 97eb35343a..3bb23a3507 100644--- a/resources/prosody-plugins/mod_muc_rate_limit.lua+++ b/resources/prosody-plugins/mod_muc_rate_limit.lua@@ -164,7 +164,7 @@ module:hook('muc-room-destroyed',function(event)if event.room.leave_rate_presence_queue thenevent.room.leave_rate_presence_queue.empty = true;end-end);+end, 1); -- prosody handles it at 0module:hook('muc-occupant-pre-leave', function (event)local occupant, room, stanza = event.occupant, event.room, event.stanza;diff --git a/resources/prosody-plugins/mod_speakerstats_component.lua b/resources/prosody-plugins/mod_speakerstats_component.luaindex 521cc47f2d..11f40a37c2 100644--- a/resources/prosody-plugins/mod_speakerstats_component.lua+++ b/resources/prosody-plugins/mod_speakerstats_component.lua@@ -331,7 +331,7 @@ function process_main_muc_loaded(main_muc, host_module)host_module:hook("muc-room-created", room_created, -1);host_module:hook("muc-occupant-joined", occupant_joined, -1);host_module:hook("muc-occupant-pre-leave", occupant_leaving, -1);- host_module:hook("muc-room-destroyed", room_destroyed, -1);+ host_module:hook("muc-room-destroyed", room_destroyed, 1); -- prosody handles it at 0endfunction process_breakout_muc_loaded(breakout_muc, host_module)@@ -340,7 +340,7 @@ function process_breakout_muc_loaded(breakout_muc, host_module)host_module:hook("muc-room-created", breakout_room_created, -1);host_module:hook("muc-occupant-joined", occupant_joined, -1);host_module:hook("muc-occupant-pre-leave", occupant_leaving, -1);- host_module:hook("muc-room-destroyed", room_destroyed, -1);+ host_module:hook("muc-room-destroyed", room_destroyed, 1); -- prosody handles it at 0end-- process or waits to process the conference muc componentdiff --git a/resources/prosody-plugins/mod_visitors.lua b/resources/prosody-plugins/mod_visitors.luaindex 65a6370303..a996e6212b 100644--- a/resources/prosody-plugins/mod_visitors.lua+++ b/resources/prosody-plugins/mod_visitors.lua@@ -329,7 +329,7 @@ process_host_module(main_muc_component_config, function(host_module, host)visitors_nodes[room.jid] = nil;end- end);+ end, 1); -- prosody handles it at 0-- detects new participants joining main room and sending them to the visitor nodeshost_module:hook('muc-occupant-joined', function (event)diff --git a/resources/prosody-plugins/mod_visitors_component.lua b/resources/prosody-plugins/mod_visitors_component.luaindex 92bc16795a..c71fdc66e2 100644--- a/resources/prosody-plugins/mod_visitors_component.lua+++ b/resources/prosody-plugins/mod_visitors_component.lua@@ -582,7 +582,7 @@ process_host_module(muc_domain_prefix..'.'..muc_domain_base, function(host_modulhost_module:hook('muc-room-destroyed', function (event)visitors_promotion_map[event.room.jid] = nil;visitors_promotion_requests[event.room.jid] = nil;- end);+ end, 1); -- prosody handles it at 0host_module:hook('muc-occupant-joined', function (event)local room, occupant = event.room, event.occupant;@@ -754,7 +754,7 @@ function handle_occupant_leaving_breakout(event)local main_room, occupant, stanza = event.main_room, event.occupant, event.stanza;local presence_status = stanza:get_child_text('status');- if presence_status ~= 'switch_room' or not visitors_promotion_map[main_room.jid] then+ if presence_status ~= 'switch_room' or not main_room or not visitors_promotion_map[main_room.jid] thenreturn;end