Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
jitsi-meet/react/features/follow-me/reducer.js

33 lines
824 B

// @flow
import {
SET_FOLLOW_ME_MODERATOR,
SET_FOLLOW_ME_STATE
} from './actionTypes';
import { ReducerRegistry, set } from '../base/redux';
/**
* Listen for actions that contain the Follow Me feature active state, so that it can be stored.
*/
ReducerRegistry.register(
'features/follow-me',
(state = {}, action) => {
switch (action.type) {
case SET_FOLLOW_ME_MODERATOR: {
let newState = set(state, 'moderator', action.id);
if (!action.id) {
// clear the state if feature becomes disabled
newState = set(newState, 'state', undefined);
}
return newState;
}
case SET_FOLLOW_ME_STATE: {
return set(state, 'state', action.state);
}
}
return state;
});