diff options
author | Chocobozzz <me@florianbigard.com> | 2018-09-20 16:24:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-20 16:24:31 +0200 |
commit | 0491173a61aed66205c017e0d7e0503ea316c144 (patch) | |
tree | ce6621597505f9518cfdf0981977d097c63f9fad /server/lib/activitypub/audience.ts | |
parent | 8704acf49efc770d73bf07c10468ed8c74d28a83 (diff) | |
parent | 6247b2057b792cea155a1abd9788c363ae7d2cc2 (diff) | |
download | PeerTube-0491173a61aed66205c017e0d7e0503ea316c144.tar.gz PeerTube-0491173a61aed66205c017e0d7e0503ea316c144.tar.zst PeerTube-0491173a61aed66205c017e0d7e0503ea316c144.zip |
Merge branch 'develop' into cli-wrapper
Diffstat (limited to 'server/lib/activitypub/audience.ts')
-rw-r--r-- | server/lib/activitypub/audience.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/server/lib/activitypub/audience.ts b/server/lib/activitypub/audience.ts index 7b4067c11..a86428461 100644 --- a/server/lib/activitypub/audience.ts +++ b/server/lib/activitypub/audience.ts | |||
@@ -6,7 +6,7 @@ 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 | 8 | ||
9 | function getVideoAudience (video: VideoModel, actorsInvolvedInVideo: ActorModel[]) { | 9 | function getRemoteVideoAudience (video: VideoModel, actorsInvolvedInVideo: ActorModel[]): ActivityAudience { |
10 | return { | 10 | return { |
11 | to: [ video.VideoChannel.Account.Actor.url ], | 11 | to: [ video.VideoChannel.Account.Actor.url ], |
12 | cc: actorsInvolvedInVideo.map(a => a.followersUrl) | 12 | cc: actorsInvolvedInVideo.map(a => a.followersUrl) |
@@ -18,7 +18,7 @@ function getVideoCommentAudience ( | |||
18 | threadParentComments: VideoCommentModel[], | 18 | threadParentComments: VideoCommentModel[], |
19 | actorsInvolvedInVideo: ActorModel[], | 19 | actorsInvolvedInVideo: ActorModel[], |
20 | isOrigin = false | 20 | isOrigin = false |
21 | ) { | 21 | ): ActivityAudience { |
22 | const to = [ ACTIVITY_PUB.PUBLIC ] | 22 | const to = [ ACTIVITY_PUB.PUBLIC ] |
23 | const cc: string[] = [] | 23 | const cc: string[] = [] |
24 | 24 | ||
@@ -41,7 +41,7 @@ function getVideoCommentAudience ( | |||
41 | } | 41 | } |
42 | } | 42 | } |
43 | 43 | ||
44 | function getObjectFollowersAudience (actorsInvolvedInObject: ActorModel[]) { | 44 | function getAudienceFromFollowersOf (actorsInvolvedInObject: ActorModel[]): ActivityAudience { |
45 | return { | 45 | return { |
46 | to: [ ACTIVITY_PUB.PUBLIC ].concat(actorsInvolvedInObject.map(a => a.followersUrl)), | 46 | to: [ ACTIVITY_PUB.PUBLIC ].concat(actorsInvolvedInObject.map(a => a.followersUrl)), |
47 | cc: [] | 47 | cc: [] |
@@ -83,9 +83,9 @@ function audiencify<T> (object: T, audience: ActivityAudience) { | |||
83 | export { | 83 | export { |
84 | buildAudience, | 84 | buildAudience, |
85 | getAudience, | 85 | getAudience, |
86 | getVideoAudience, | 86 | getRemoteVideoAudience, |
87 | getActorsInvolvedInVideo, | 87 | getActorsInvolvedInVideo, |
88 | getObjectFollowersAudience, | 88 | getAudienceFromFollowersOf, |
89 | audiencify, | 89 | audiencify, |
90 | getVideoCommentAudience | 90 | getVideoCommentAudience |
91 | } | 91 | } |