From b667a68bd4eb916084658592d2942d521950005b Mon Sep 17 00:00:00 2001 From: Julia Johannesen Date: Sun, 22 Sep 2024 18:35:29 -0400 Subject: [PATCH] Use `res.ok` instead of 200-299 --- packages/backend/src/core/activitypub/ApRequestService.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/backend/src/core/activitypub/ApRequestService.ts b/packages/backend/src/core/activitypub/ApRequestService.ts index ec06b4d9c1..533c8250e0 100644 --- a/packages/backend/src/core/activitypub/ApRequestService.ts +++ b/packages/backend/src/core/activitypub/ApRequestService.ts @@ -208,8 +208,7 @@ export class ApRequestService { const contentType = res.headers.get('content-type'); if ( - res.status >= 200 - && res.status <= 299 + res.ok && (contentType ?? '').split(';')[0].trimEnd().toLowerCase() === 'text/html' && _followAlternate === true ) {