Skip to content

Node.js based forum software built for the modern web

fix: replace outdated .includes() check for AP header in webfinger query method, in favour of Helpers.assertAccept

Julian Lam2079ea00d9a8
diff --git a/src/activitypub/helpers.js b/src/activitypub/helpers.js
index 18dc506a80..e5a1d7c05c 100644
--- a/src/activitypub/helpers.js
+++ b/src/activitypub/helpers.js
@@ -138,7 +138,7 @@ Helpers.query = async (id) => {
}
// Parse links to find actor endpoint
- let actorUri = body.links.filter(link => activitypub._constants.acceptableTypes.includes(link.type) && link.rel === 'self');
+ let actorUri = body.links.filter(link => Helpers.assertAccept(link.type) && link.rel === 'self');
if (actorUri.length) {
actorUri = actorUri.pop();
({ href: actorUri } = actorUri);