|
@@ -353,15 +353,15 @@ module:hook('muc-broadcast-presence', function (event)
|
353
|
353
|
module:send(promotion_request);
|
354
|
354
|
end
|
355
|
355
|
|
|
356
|
+ local requestTranscriptionValue = full_p:get_child_text(PARTICIPANT_PROP_REQUEST_TRANSCRIPTION);
|
|
357
|
+ local hasTranscriptionEnabled = room._transcription_languages and room._transcription_languages[occupant.jid];
|
|
358
|
+
|
356
|
359
|
-- detect transcription
|
357
|
|
- if full_p:get_child_text(PARTICIPANT_PROP_REQUEST_TRANSCRIPTION) then
|
|
360
|
+ if requestTranscriptionValue == 'true' then
|
358
|
361
|
local lang = full_p:get_child_text(PARTICIPANT_PROP_TRANSLATION_LANG);
|
359
|
362
|
|
360
|
|
- occupant._transcription_enabled = true;
|
361
|
|
-
|
362
|
363
|
add_transcription(room, occupant, lang);
|
363
|
|
- elseif occupant._transcription_enabled then
|
364
|
|
- occupant._transcription_enabled = false;
|
|
364
|
+ elseif hasTranscriptionEnabled then
|
365
|
365
|
remove_transcription(room, occupant, nil);
|
366
|
366
|
end
|
367
|
367
|
|