From faa9d434b4d681837ff2a87603337c2623419669 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 17 Jun 2020 10:55:40 +0200 Subject: Update server dependencies --- server/lib/activitypub/actor.ts | 4 ++-- server/lib/activitypub/audience.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'server/lib/activitypub') diff --git a/server/lib/activitypub/actor.ts b/server/lib/activitypub/actor.ts index c743dcf3f..0e5742071 100644 --- a/server/lib/activitypub/actor.ts +++ b/server/lib/activitypub/actor.ts @@ -166,7 +166,7 @@ async function updateActorInstance (actorInstance: ActorModel, attributes: Activ actorInstance.followersUrl = attributes.followers actorInstance.followingUrl = attributes.following - if (attributes.endpoints && attributes.endpoints.sharedInbox) { + if (attributes.endpoints?.sharedInbox) { actorInstance.sharedInboxUrl = attributes.endpoints.sharedInbox } } @@ -457,7 +457,7 @@ async function fetchRemoteActor (actorUrl: string): Promise<{ statusCode?: numbe followersUrl: actorJSON.followers, followingUrl: actorJSON.following, - sharedInboxUrl: actorJSON.endpoints && actorJSON.endpoints.sharedInbox + sharedInboxUrl: actorJSON.endpoints?.sharedInbox ? actorJSON.endpoints.sharedInbox : null }) diff --git a/server/lib/activitypub/audience.ts b/server/lib/activitypub/audience.ts index 551d04ae3..4b30d1f6f 100644 --- a/server/lib/activitypub/audience.ts +++ b/server/lib/activitypub/audience.ts @@ -55,7 +55,7 @@ async function getActorsInvolvedInVideo (video: MVideoId, t: Transaction) { const videoAll = video as VideoModel - const videoActor = videoAll.VideoChannel && videoAll.VideoChannel.Account + const videoActor = videoAll.VideoChannel?.Account ? videoAll.VideoChannel.Account.Actor : await ActorModel.loadFromAccountByVideoId(video.id, t) -- cgit v1.2.3