fix(subtitles) fix skipping transcription messages

If we are not requesting any transcription, `language` will be `null` so
take that into consideration when checking if we should stop processing
a transcription message after firing the API event.

Fixes: https://github.com/jitsi/docker-jitsi-meet/issues/1997
This commit is contained in:
Saúl Ibarra Corretgé
2025-01-16 11:48:31 +01:00
committed by Saúl Ibarra Corretgé
parent 0ae8051fb4
commit 1827610fc1

View File

@@ -196,7 +196,7 @@ function _endpointMessageReceived(store: IStore, next: Function, action: AnyActi
// Regex to filter out all possible country codes after language code:
// this should catch all notations like 'en-GB' 'en_GB' and 'enGB'
// and be independent of the country code length
if (_getPrimaryLanguageCode(json.language) !== _getPrimaryLanguageCode(language)) {
if (!language || (_getPrimaryLanguageCode(json.language) !== _getPrimaryLanguageCode(language))) {
return next(action);
}