Improve domain unblock compatibility, fixes #422
This commit is contained in:
parent
2024c4ec0d
commit
03e33df86b
1 changed files with 7 additions and 1 deletions
|
@ -61,7 +61,13 @@ export function unblockDomain(domain) {
|
|||
|
||||
dispatch(unblockDomainRequest(domain));
|
||||
|
||||
api(getState).delete('/api/v1/domain_blocks', { params: { domain } }).then(() => {
|
||||
// Do it both ways for maximum compatibility
|
||||
const params = {
|
||||
params: { domain },
|
||||
data: { domain },
|
||||
};
|
||||
|
||||
api(getState).delete('/api/v1/domain_blocks', params).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(unblockDomainSuccess(domain, accounts));
|
||||
|
|
Loading…
Reference in a new issue