Change account domain block to clear out notifications and follows (#11393)

This commit is contained in:
Eugen Rochko
2019-07-25 04:17:35 +02:00
committed by GitHub
parent 94f5c714f1
commit 4eeff26533
7 changed files with 51 additions and 35 deletions

View File

@ -23,6 +23,7 @@ export function blockDomain(domain) {
api(getState).post('/api/v1/domain_blocks', { domain }).then(() => {
const at_domain = '@' + domain;
const accounts = getState().get('accounts').filter(item => item.get('acct').endsWith(at_domain)).valueSeq().map(item => item.get('id'));
dispatch(blockDomainSuccess(domain, accounts));
}).catch(err => {
dispatch(blockDomainFail(domain, err));