feat: Updates the local stats to match remote for 'connected to'.

This commit is contained in:
damencho 2022-08-10 16:19:48 -05:00 committed by Дамян Минков
parent 82c047707f
commit fa39c10766
1 changed files with 21 additions and 0 deletions

View File

@ -25,6 +25,7 @@ import {
forEachConference,
getCurrentConference
} from '../conference';
import { SET_CONFIG } from '../config';
import { getDisableRemoveRaisedHandOnFocus } from '../config/functions.any';
import { JitsiConferenceEvents } from '../lib-jitsi-meet';
import { MEDIA_TYPE } from '../media';
@ -177,6 +178,26 @@ MiddlewareRegistry.register(store => next => action => {
break;
}
case SET_CONFIG: {
const result = next(action);
const state = store.getState();
const { deploymentInfo } = state['features/base/config'];
// if there userRegion set let's use it for the local participant
if (deploymentInfo && deploymentInfo.userRegion) {
const localId = getLocalParticipant(state)?.id;
store.dispatch(participantUpdated({
id: localId,
local: true,
region: deploymentInfo.userRegion
}));
}
return result;
}
case SET_LOCAL_PARTICIPANT_RECORDING_STATUS: {
const state = store.getState();
const { recording, onlySelf } = action;