Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

ref: Make is_healthcheck_room more generic.

Boris Grozev76e1217439ba
diff --git a/resources/prosody-plugins/mod_muc_allowners.lua b/resources/prosody-plugins/mod_muc_allowners.lua
index 0fca2ebd93..603ef0c1c0 100644
--- a/resources/prosody-plugins/mod_muc_allowners.lua
+++ b/resources/prosody-plugins/mod_muc_allowners.lua
@@ -3,7 +3,7 @@ local is_healthcheck_room = module:require "util".is_healthcheck_room;
module:hook("muc-occupant-joined", function (event)
local room, occupant = event.room, event.occupant;
- if is_healthcheck_room(room) then
+ if is_healthcheck_room(room.jid) then
return;
end
@@ -13,7 +13,7 @@ end, 2);
module:hook("muc-occupant-left", function (event)
local room, occupant = event.room, event.occupant;
- if is_healthcheck_room(room) then
+ if is_healthcheck_room(room.jid) then
return;
end
diff --git a/resources/prosody-plugins/mod_muc_lobby_rooms.lua b/resources/prosody-plugins/mod_muc_lobby_rooms.lua
index 4249614817..7af0e90aad 100644
--- a/resources/prosody-plugins/mod_muc_lobby_rooms.lua
+++ b/resources/prosody-plugins/mod_muc_lobby_rooms.lua
@@ -209,7 +209,7 @@ process_host_module(main_muc_component_config, function(host_module, host)
host_module:hook('muc-occupant-pre-join', function (event)
local room, stanza = event.room, event.stanza;
- if is_healthcheck_room(room) then
+ if is_healthcheck_room(room.jid) then
return;
end
diff --git a/resources/prosody-plugins/mod_muc_meeting_id.lua b/resources/prosody-plugins/mod_muc_meeting_id.lua
index 24fbff6d6e..1d9bc74395 100644
--- a/resources/prosody-plugins/mod_muc_meeting_id.lua
+++ b/resources/prosody-plugins/mod_muc_meeting_id.lua
@@ -9,7 +9,7 @@ local is_healthcheck_room = module:require "util".is_healthcheck_room;
module:hook("muc-room-created", function(event)
local room = event.room;
- if is_healthcheck_room(room) then
+ if is_healthcheck_room(room.jid) then
return;
end
diff --git a/resources/prosody-plugins/mod_speakerstats_component.lua b/resources/prosody-plugins/mod_speakerstats_component.lua
index 7124109b86..6daa6f0840 100644
--- a/resources/prosody-plugins/mod_speakerstats_component.lua
+++ b/resources/prosody-plugins/mod_speakerstats_component.lua
@@ -113,7 +113,7 @@ end
function room_created(event)
local room = event.room;
- if is_healthcheck_room(room) then
+ if is_healthcheck_room(room.jid) then
return;
end
@@ -124,7 +124,7 @@ end
function occupant_joined(event)
local room = event.room;
- if is_healthcheck_room(room) then
+ if is_healthcheck_room(room.jid) then
return;
end
@@ -184,7 +184,7 @@ end
function occupant_leaving(event)
local room = event.room;
- if is_healthcheck_room(room) then
+ if is_healthcheck_room(room.jid) then
return;
end
@@ -205,7 +205,7 @@ end
function room_destroyed(event)
local room = event.room;
- if is_healthcheck_room(room) then
+ if is_healthcheck_room(room.jid) then
return;
end
diff --git a/resources/prosody-plugins/util.lib.lua b/resources/prosody-plugins/util.lib.lua
index 155e5f5c46..9ef355a392 100644
--- a/resources/prosody-plugins/util.lib.lua
+++ b/resources/prosody-plugins/util.lib.lua
@@ -175,9 +175,10 @@ end
function starts_with(str, start)
return str:sub(1, #start) == start
end
+
-- healthcheck rooms in jicofo starts with a string '__jicofo-health-check'
-function is_healthcheck_room(room)
- if starts_with(room.jid, "__jicofo-health-check") then
+function is_healthcheck_room(room_jid)
+ if starts_with(room_jid, "__jicofo-health-check") then
return true;
end