X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fhelpers%2Factivitypub.ts;h=fe721cbac1f01e351d157dd8a7d965c45ffd8c1d;hb=21d68e68039a1eefbe6213fbde46e737e520ee7d;hp=e0754b501b2ce39729997c298942c20a81f9fb89;hpb=903353d67a8d0fdda8465ed6c57b77a9a5afbe92;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/helpers/activitypub.ts b/server/helpers/activitypub.ts index e0754b501..fe721cbac 100644 --- a/server/helpers/activitypub.ts +++ b/server/helpers/activitypub.ts @@ -1,4 +1,4 @@ -import * as Bluebird from 'bluebird' +import Bluebird from 'bluebird' import { URL } from 'url' import validator from 'validator' import { ContextType } from '@shared/models/activitypub/context' @@ -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) {