feat: Reduces into state region and shard changes from the lib. (#14546)

* feat: Reduces into state region and shard changes from the lib.

* squash: Fixes few comments.

* chore(deps) lib-jitsi-meet@latest

https://github.com/jitsi/lib-jitsi-meet/compare/v1802.0.0+49ff6eb4...v1803.0.0+5237dbfe
This commit is contained in:
Дамян Минков
2024-03-26 18:01:53 -05:00
committed by GitHub
parent 56eecaba2a
commit 2c6f4e27fc
5 changed files with 69 additions and 7 deletions

View File

@@ -3,6 +3,7 @@ import _ from 'lodash';
import { CONFERENCE_INFO } from '../../conference/components/constants';
import { TOOLBAR_BUTTONS } from '../../toolbox/constants';
import { ToolbarButton } from '../../toolbox/types';
import { CONNECTION_PROPERTIES_UPDATED } from '../connection/actionTypes';
import ReducerRegistry from '../redux/ReducerRegistry';
import { equals } from '../redux/functions';
@@ -94,6 +95,24 @@ ReducerRegistry.register<IConfigState>('features/base/config', (state = _getInit
locationURL: action.locationURL
};
case CONNECTION_PROPERTIES_UPDATED: {
const { region, shard } = action.properties;
const { deploymentInfo } = state;
if (deploymentInfo?.region === region && deploymentInfo?.shard === shard) {
return state;
}
return {
...state,
deploymentInfo: JSON.parse(JSON.stringify({
...deploymentInfo,
region,
shard
}))
};
}
case LOAD_CONFIG_ERROR:
// XXX LOAD_CONFIG_ERROR is one of the settlement execution paths of
// the asynchronous "loadConfig procedure/process" started with