X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Factivitypub%2Faudience.ts;h=2986714d309c4290b96d3bd11f6f9fd7040c6028;hb=fae6e4da8f516a9d6c3bad9bf6f35811ccacbad8;hp=551d04ae35e3c72d7f1ce86828bcc0a62dfaf2e8;hpb=610d0be13b3d01f653ef269271dd667a57c85ef2;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/activitypub/audience.ts b/server/lib/activitypub/audience.ts index 551d04ae3..2986714d3 100644 --- a/server/lib/activitypub/audience.ts +++ b/server/lib/activitypub/audience.ts @@ -4,7 +4,7 @@ import { ACTIVITY_PUB } from '../../initializers/constants' import { ActorModel } from '../../models/activitypub/actor' import { VideoModel } from '../../models/video/video' import { VideoShareModel } from '../../models/video/video-share' -import { MActorFollowersUrl, MActorLight, MActorUrl, MCommentOwner, MCommentOwnerVideo, MVideoId } from '../../typings/models' +import { MActorFollowersUrl, MActorLight, MActorUrl, MCommentOwner, MCommentOwnerVideo, MVideoId } from '../../types/models' function getRemoteVideoAudience (accountActor: MActorUrl, actorsInvolvedInVideo: MActorFollowersUrl[]): ActivityAudience { return { @@ -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)