From 03e33df86bc83c5def91ade988a5618353816526 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 16 Jul 2020 13:39:59 -0500 Subject: [PATCH] Improve domain unblock compatibility, fixes #422 --- app/soapbox/actions/domain_blocks.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/soapbox/actions/domain_blocks.js b/app/soapbox/actions/domain_blocks.js index efd878661..a5ebb0c99 100644 --- a/app/soapbox/actions/domain_blocks.js +++ b/app/soapbox/actions/domain_blocks.js @@ -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));