]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/activitypub/audience.ts
Stronger actor association typing in AP functions
[github/Chocobozzz/PeerTube.git] / server / lib / activitypub / audience.ts
index 771a01366dd91297aa3c3d2268bac6721bd2b6fa..0e3d78590dfa78be4bc1a65a9a3a9a1f18e2d61e 100644 (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)
 }