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

pull/12051/head jitsi-meet_7659
damencho 2 years ago committed by Дамян Минков
parent 82c047707f
commit fa39c10766
  1. 21
      react/features/base/participants/middleware.js

@ -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;

Loading…
Cancel
Save