jitsi-meet-electron/app/features/settings/middleware.js
Saúl Ibarra Corretgé a1a52c4b42 Refactor avatar
Don't use abotars, as they are no longer used in Jitsi Meet.
2020-05-20 12:06:27 +02:00

20 lines
451 B
JavaScript

// @flow
import { SET_EMAIL, SET_NAME } from './actionTypes';
import { setAvatarURL } from './actions';
import { getAvatarURL } from './functions';
export default (store: Object) => (next: Function) => (action: Object) => {
const result = next(action);
const state = store.getState();
switch (action.type) {
case SET_EMAIL:
case SET_NAME:
store.dispatch(setAvatarURL(getAvatarURL(state)));
}
return result;
};