Skip to content

Commit

Permalink
fix(backend/ActivityPubServerService): apOrHtml Constraintが正しく評価されない問…
Browse files Browse the repository at this point in the history
…題を修正
  • Loading branch information
u1-liquid authored Jan 4, 2025
1 parent 6dcda9d commit 6a819f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/backend/src/server/ActivityPubServerService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -524,8 +524,8 @@ export class ActivityPubServerService {
},
deriveConstraint(request: IncomingMessage) {
const accepted = accepts(request).type(['html', ACTIVITY_JSON, LD_JSON]);
const isAp = typeof accepted === 'string' && !accepted.match(/html/);
return isAp ? 'ap' : 'html';
if (accepted === false) return null;
return accepted !== 'html' ? 'ap' : 'html';
},
});

Expand Down

0 comments on commit 6a819f9

Please sign in to comment.