diff options
author | Chocobozzz <me@florianbigard.com> | 2019-08-09 08:17:16 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-08-09 08:17:16 +0200 |
commit | 5224c394b3bbac6ec1543e41fa0ec6db436e84fa (patch) | |
tree | 36eaecfe095547aca903a8a43fb6e0b0b01899a9 /server/lib/activitypub/audience.ts | |
parent | 511765c9f86fb07d5d856decd9dbf0ec2092f4fe (diff) | |
download | PeerTube-5224c394b3bbac6ec1543e41fa0ec6db436e84fa.tar.gz PeerTube-5224c394b3bbac6ec1543e41fa0ec6db436e84fa.tar.zst PeerTube-5224c394b3bbac6ec1543e41fa0ec6db436e84fa.zip |
Stronger actor association typing in AP functions
Diffstat (limited to 'server/lib/activitypub/audience.ts')
-rw-r--r-- | server/lib/activitypub/audience.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/lib/activitypub/audience.ts b/server/lib/activitypub/audience.ts index 771a01366..0e3d78590 100644 --- a/server/lib/activitypub/audience.ts +++ b/server/lib/activitypub/audience.ts | |||
@@ -5,6 +5,7 @@ import { ActorModel } from '../../models/activitypub/actor' | |||
5 | import { VideoModel } from '../../models/video/video' | 5 | import { VideoModel } from '../../models/video/video' |
6 | import { VideoCommentModel } from '../../models/video/video-comment' | 6 | import { VideoCommentModel } from '../../models/video/video-comment' |
7 | import { VideoShareModel } from '../../models/video/video-share' | 7 | import { VideoShareModel } from '../../models/video/video-share' |
8 | import { ActorModelOnly } from '../../typings/models' | ||
8 | 9 | ||
9 | function getRemoteVideoAudience (video: VideoModel, actorsInvolvedInVideo: ActorModel[]): ActivityAudience { | 10 | function getRemoteVideoAudience (video: VideoModel, actorsInvolvedInVideo: ActorModel[]): ActivityAudience { |
10 | return { | 11 | return { |
@@ -60,7 +61,7 @@ async function getActorsInvolvedInVideo (video: VideoModel, t: Transaction) { | |||
60 | return actors | 61 | return actors |
61 | } | 62 | } |
62 | 63 | ||
63 | function getAudience (actorSender: ActorModel, isPublic = true) { | 64 | function getAudience (actorSender: ActorModelOnly, isPublic = true) { |
64 | return buildAudience([ actorSender.followersUrl ], isPublic) | 65 | return buildAudience([ actorSender.followersUrl ], isPublic) |
65 | } | 66 | } |
66 | 67 | ||