From a2f99b54dfdfe489e14714681189cb13c89f60a3 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 16 Nov 2021 10:05:12 +0100 Subject: Optimize AP fetch --- server/helpers/activitypub.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/helpers/activitypub.ts') diff --git a/server/helpers/activitypub.ts b/server/helpers/activitypub.ts index 8b56d2d50..fe721cbac 100644 --- a/server/helpers/activitypub.ts +++ b/server/helpers/activitypub.ts @@ -187,10 +187,10 @@ function buildSignedActivity (byActor: MActor, data: T, contextType?: Contex return signJsonLDObject(byActor, activity) } -function getAPId (activity: string | { id: string }) { - if (typeof activity === 'string') return activity +function getAPId (object: string | { id: string }) { + if (typeof object === 'string') return object - return activity.id + return object.id } function checkUrlsSameHost (url1: string, url2: string) { -- cgit v1.2.3