|
@@ -172,8 +172,11 @@ function _endpointMessageReceived(store: IStore, next: Function, action: AnyActi
|
172
|
172
|
}
|
173
|
173
|
}
|
174
|
174
|
|
175
|
|
- // If the suer is not requesting transcriptions just bail.
|
176
|
|
- if (json.language.slice(0, 2) !== language) {
|
|
175
|
+ // If the user is not requesting transcriptions just bail.
|
|
176
|
+ // Regex to filter out all possible country codes after language code:
|
|
177
|
+ // this should catch all notations like 'en-GB' 'en_GB' and 'enGB'
|
|
178
|
+ // and be independent of the country code length
|
|
179
|
+ if (json.language.replace(/[-_A-Z].*/, '') !== language) {
|
177
|
180
|
return next(action);
|
178
|
181
|
}
|
179
|
182
|
|