Break out a separate mute modal with a hide-notifications checkbox.

This commit is contained in:
Surinna Curtis
2017-08-06 19:36:04 -03:00
parent 0c547faf92
commit 4612f7caea
9 changed files with 168 additions and 14 deletions

View File

@@ -240,11 +240,11 @@ export function unblockAccountFail(error) {
};
export function muteAccount(id) {
export function muteAccount(id, notifications) {
return (dispatch, getState) => {
dispatch(muteAccountRequest(id));
api(getState).post(`/api/v1/accounts/${id}/mute`).then(response => {
api(getState).post(`/api/v1/accounts/${id}/mute`, { notifications }).then(response => {
// Pass in entire statuses map so we can use it to filter stuff in different parts of the reducers
dispatch(muteAccountSuccess(response.data, getState().get('statuses')));
}).catch(error => {