Skip to content

Commit

Permalink
fix(visitors): Fixes go live check.
Browse files Browse the repository at this point in the history
We need to check whether the live field is defined ignoring its boolean value. When it is false we were ignoring it and still marking the room as live.
  • Loading branch information
damencho committed Dec 2, 2024
1 parent 0149b5f commit 92033fa
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions resources/prosody-plugins/mod_visitors_component.lua
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ local function go_live(room)

-- if missing we assume room is live, only skip if it is marked explicitly as false
if room.jitsiMetadata and room.jitsiMetadata.visitors
and room.jitsiMetadata.visitors.live and room.jitsiMetadata.visitors.live == false then
and room.jitsiMetadata.visitors.live ~= nil and room.jitsiMetadata.visitors.live == false then
return;
end

Expand Down Expand Up @@ -624,7 +624,13 @@ process_host_module(muc_domain_prefix..'.'..muc_domain_base, function(host_modul
go_live(event.room);
end);
host_module:hook('muc-occupant-joined', function (event)
go_live(event.room);
local room = event.room;

if is_healthcheck_room(room.jid) then
return;
end

go_live(room);
end);
end

Expand Down

0 comments on commit 92033fa

Please sign in to comment.