mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-17 03:27:48 +00:00
40 lines
907 B
JavaScript
40 lines
907 B
JavaScript
import { SET_CONFIG } from '../base/config';
|
|
import { MiddlewareRegistry } from '../base/redux';
|
|
|
|
import { SET_DYNAMIC_BRANDING_DATA } from './actionTypes';
|
|
import { fetchCustomBrandingData } from './actions.native';
|
|
|
|
|
|
MiddlewareRegistry.register(store => next => action => {
|
|
switch (action.type) {
|
|
case SET_CONFIG: {
|
|
const result = next(action);
|
|
|
|
store.dispatch(fetchCustomBrandingData());
|
|
|
|
return result;
|
|
}
|
|
|
|
case SET_DYNAMIC_BRANDING_DATA: {
|
|
const {
|
|
avatarBackgrounds = [],
|
|
backgroundColor,
|
|
backgroundImageUrl,
|
|
didPageUrl,
|
|
inviteDomain
|
|
} = action.value;
|
|
|
|
action.value = {
|
|
avatarBackgrounds,
|
|
backgroundColor,
|
|
backgroundImageUrl,
|
|
didPageUrl,
|
|
inviteDomain
|
|
};
|
|
break;
|
|
}
|
|
}
|
|
|
|
return next(action);
|
|
});
|