import { ActorModel } from '../../models/activitypub/actor'
import { VideoModel } from '../../models/video/video'
import { VideoShareModel } from '../../models/video/video-share'
-import {
- MActorFollowersUrl,
- MActorLight,
- MCommentOwner,
- MCommentOwnerVideo,
- MVideo,
- MVideoAccountLight,
- MVideoId
-} from '../../typings/models'
-
-function getRemoteVideoAudience (video: MVideoAccountLight, actorsInvolvedInVideo: MActorFollowersUrl[]): ActivityAudience {
+import { MActorFollowersUrl, MActorLight, MActorUrl, MCommentOwner, MCommentOwnerVideo, MVideoId } from '../../typings/models'
+
+function getRemoteVideoAudience (accountActor: MActorUrl, actorsInvolvedInVideo: MActorFollowersUrl[]): ActivityAudience {
return {
- to: [ video.VideoChannel.Account.Actor.url ],
+ to: [ accountActor.url ],
cc: actorsInvolvedInVideo.map(a => a.followersUrl)
}
}
// Send to actors we reply to
for (const parentComment of threadParentComments) {
+ if (parentComment.isDeleted()) continue
+
cc.push(parentComment.Account.Actor.url)
}