aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub/audience.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/activitypub/audience.ts')
-rw-r--r--server/lib/activitypub/audience.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/server/lib/activitypub/audience.ts b/server/lib/activitypub/audience.ts
index c1265dbcd..7164135b6 100644
--- a/server/lib/activitypub/audience.ts
+++ b/server/lib/activitypub/audience.ts
@@ -20,7 +20,7 @@ function getVideoCommentAudience (
20 isOrigin = false 20 isOrigin = false
21) { 21) {
22 const to = [ ACTIVITY_PUB.PUBLIC ] 22 const to = [ ACTIVITY_PUB.PUBLIC ]
23 const cc = [ ] 23 const cc = []
24 24
25 // Owner of the video we comment 25 // Owner of the video we comment
26 if (isOrigin === false) { 26 if (isOrigin === false) {
@@ -55,7 +55,7 @@ async function getActorsInvolvedInVideo (video: VideoModel, t: Transaction) {
55 return actors 55 return actors
56} 56}
57 57
58async function getAudience (actorSender: ActorModel, t: Transaction, isPublic = true) { 58function getAudience (actorSender: ActorModel, isPublic = true) {
59 return buildAudience([ actorSender.followersUrl ], isPublic) 59 return buildAudience([ actorSender.followersUrl ], isPublic)
60} 60}
61 61
@@ -67,14 +67,14 @@ function buildAudience (followerUrls: string[], isPublic = true) {
67 to = [ ACTIVITY_PUB.PUBLIC ] 67 to = [ ACTIVITY_PUB.PUBLIC ]
68 cc = followerUrls 68 cc = followerUrls
69 } else { // Unlisted 69 } else { // Unlisted
70 to = [ ] 70 to = []
71 cc = [ ] 71 cc = []
72 } 72 }
73 73
74 return { to, cc } 74 return { to, cc }
75} 75}
76 76
77function audiencify <T> (object: T, audience: ActivityAudience) { 77function audiencify<T> (object: T, audience: ActivityAudience) {
78 return Object.assign(object, audience) 78 return Object.assign(object, audience)
79} 79}
80 80