Skip to content

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

fix(visitors): Fixes detection of turning of subtitles by visitor.

damenchoda35c96afd60
diff --git a/resources/prosody-plugins/mod_fmuc.lua b/resources/prosody-plugins/mod_fmuc.lua
index 92fd6f1183..e83ed7ff71 100644
--- a/resources/prosody-plugins/mod_fmuc.lua
+++ b/resources/prosody-plugins/mod_fmuc.lua
@@ -353,15 +353,15 @@ module:hook('muc-broadcast-presence', function (event)
module:send(promotion_request);
end
+ local requestTranscriptionValue = full_p:get_child_text(PARTICIPANT_PROP_REQUEST_TRANSCRIPTION);
+ local hasTranscriptionEnabled = room._transcription_languages and room._transcription_languages[occupant.jid];
+
-- detect transcription
- if full_p:get_child_text(PARTICIPANT_PROP_REQUEST_TRANSCRIPTION) then
+ if requestTranscriptionValue == 'true' then
local lang = full_p:get_child_text(PARTICIPANT_PROP_TRANSLATION_LANG);
- occupant._transcription_enabled = true;
-
add_transcription(room, occupant, lang);
- elseif occupant._transcription_enabled then
- occupant._transcription_enabled = false;
+ elseif hasTranscriptionEnabled then
remove_transcription(room, occupant, nil);
end