From 3339baac18b00e6cef9ca915e58e5b7112fb0a30 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 22 Dec 2023 16:02:27 -0500 Subject: [PATCH] fix: relax activity-failed condition --- src/activitypub/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/activitypub/index.js b/src/activitypub/index.js index 0919ea1636..17abe9b282 100644 --- a/src/activitypub/index.js +++ b/src/activitypub/index.js @@ -187,7 +187,7 @@ ActivityPub.send = async (uid, targets, payload) => { body: payload, }); - if (response.statusCode !== 201) { + if (!String(response.statusCode).startsWith('2')) { // todo: i18n this throw new Error('activity-failed'); }