1
0
mirror of https://github.com/funamitech/mastodon synced 2024-12-14 06:38:39 +09:00
YuruToot/app/javascript/mastodon/reducers/notification_policy.js

13 lines
327 B
JavaScript
Raw Normal View History

import { fromJS } from 'immutable';
import { NOTIFICATION_POLICY_FETCH_SUCCESS } from 'mastodon/actions/notifications';
export const notificationPolicyReducer = (state = null, action) => {
switch(action.type) {
case NOTIFICATION_POLICY_FETCH_SUCCESS:
return fromJS(action.policy);
default:
return state;
}
};