Stronger actor association typing in AP functions

This commit is contained in:
Chocobozzz 2019-08-09 08:17:16 +02:00
parent 511765c9f8
commit 5224c394b3
No known key found for this signature in database
GPG key ID: 583A612D890159BE
31 changed files with 146 additions and 89 deletions

View file

@ -5,6 +5,7 @@ import { ActorModel } from '../../models/activitypub/actor'
import { VideoModel } from '../../models/video/video'
import { VideoCommentModel } from '../../models/video/video-comment'
import { VideoShareModel } from '../../models/video/video-share'
import { ActorModelOnly } from '../../typings/models'
function getRemoteVideoAudience (video: VideoModel, actorsInvolvedInVideo: ActorModel[]): ActivityAudience {
return {
@ -60,7 +61,7 @@ async function getActorsInvolvedInVideo (video: VideoModel, t: Transaction) {
return actors
}
function getAudience (actorSender: ActorModel, isPublic = true) {
function getAudience (actorSender: ActorModelOnly, isPublic = true) {
return buildAudience([ actorSender.followersUrl ], isPublic)
}