X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=server%2Flib%2Factivitypub%2Fshare.ts;h=af0dd510a97bf4179e1b11e04245e7f37c948d28;hb=99b757488c077cee7d0ab89eeec181a7ee6290eb;hp=0fefcbbc560fdfafb0febaa0d611ae9365803bc8;hpb=4638cd713dcdd007cd7f49b9a95fa62ac7823e7c;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/activitypub/share.ts b/server/lib/activitypub/share.ts index 0fefcbbc5..af0dd510a 100644 --- a/server/lib/activitypub/share.ts +++ b/server/lib/activitypub/share.ts @@ -57,7 +57,7 @@ export { async function addVideoShare (shareUrl: string, video: MVideoId) { const { body } = await doJSONRequest(shareUrl, { activityPub: true }) - if (!body || !body.actor) throw new Error('Body or body actor is invalid') + if (!body?.actor) throw new Error('Body or body actor is invalid') const actorUrl = getAPId(body.actor) if (checkUrlsSameHost(shareUrl, actorUrl) !== true) {