Simplify fetching object in resolver.ts
Some checks failed
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/lint-backend Pipeline was successful
ci/woodpecker/pr/test Pipeline failed
ci/woodpecker/pr/lint-client Pipeline failed
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/test Pipeline failed

this.user will always be true, so we aren't doing unsigned fetches.
This commit is contained in:
Norm 2022-08-21 13:13:34 -04:00
parent 77bfc2450d
commit 8e5a350f1b

View file

@ -76,9 +76,7 @@ export default class Resolver {
this.user = await getInstanceActor();
}
const object = (this.user
? await signedGet(value, this.user)
: await getJson(value, 'application/activity+json, application/ld+json')) as IObject;
const object = await signedGet(value, this.user);
if (object == null || (
Array.isArray(object['@context']) ?