diff options
Diffstat (limited to 'server/lib/activitypub/send/send-create.ts')
-rw-r--r-- | server/lib/activitypub/send/send-create.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/server/lib/activitypub/send/send-create.ts b/server/lib/activitypub/send/send-create.ts index 293947b05..f7a8cf0b3 100644 --- a/server/lib/activitypub/send/send-create.ts +++ b/server/lib/activitypub/send/send-create.ts | |||
@@ -16,10 +16,13 @@ import { | |||
16 | getVideoAudience, | 16 | getVideoAudience, |
17 | getVideoCommentAudience | 17 | getVideoCommentAudience |
18 | } from '../audience' | 18 | } from '../audience' |
19 | import { logger } from '../../../helpers/logger' | ||
19 | 20 | ||
20 | async function sendCreateVideo (video: VideoModel, t: Transaction) { | 21 | async function sendCreateVideo (video: VideoModel, t: Transaction) { |
21 | if (video.privacy === VideoPrivacy.PRIVATE) return undefined | 22 | if (video.privacy === VideoPrivacy.PRIVATE) return undefined |
22 | 23 | ||
24 | logger.info('Creating job to send video creation of %s.', video.url) | ||
25 | |||
23 | const byActor = video.VideoChannel.Account.Actor | 26 | const byActor = video.VideoChannel.Account.Actor |
24 | const videoObject = video.toActivityPubObject() | 27 | const videoObject = video.toActivityPubObject() |
25 | 28 | ||
@@ -32,6 +35,8 @@ async function sendCreateVideo (video: VideoModel, t: Transaction) { | |||
32 | async function sendVideoAbuse (byActor: ActorModel, videoAbuse: VideoAbuseModel, video: VideoModel, t: Transaction) { | 35 | async function sendVideoAbuse (byActor: ActorModel, videoAbuse: VideoAbuseModel, video: VideoModel, t: Transaction) { |
33 | const url = getVideoAbuseActivityPubUrl(videoAbuse) | 36 | const url = getVideoAbuseActivityPubUrl(videoAbuse) |
34 | 37 | ||
38 | logger.info('Creating job to send video abuse %s.', url) | ||
39 | |||
35 | const audience = { to: [ video.VideoChannel.Account.Actor.url ], cc: [] } | 40 | const audience = { to: [ video.VideoChannel.Account.Actor.url ], cc: [] } |
36 | const data = createActivityData(url, byActor, videoAbuse.toActivityPubObject(), audience) | 41 | const data = createActivityData(url, byActor, videoAbuse.toActivityPubObject(), audience) |
37 | 42 | ||
@@ -39,6 +44,8 @@ async function sendVideoAbuse (byActor: ActorModel, videoAbuse: VideoAbuseModel, | |||
39 | } | 44 | } |
40 | 45 | ||
41 | async function sendCreateVideoComment (comment: VideoCommentModel, t: Transaction) { | 46 | async function sendCreateVideoComment (comment: VideoCommentModel, t: Transaction) { |
47 | logger.info('Creating job to send comment %s.', comment.url) | ||
48 | |||
42 | const isOrigin = comment.Video.isOwned() | 49 | const isOrigin = comment.Video.isOwned() |
43 | 50 | ||
44 | const byActor = comment.Account.Actor | 51 | const byActor = comment.Account.Actor |
@@ -74,6 +81,8 @@ async function sendCreateVideoComment (comment: VideoCommentModel, t: Transactio | |||
74 | } | 81 | } |
75 | 82 | ||
76 | async function sendCreateView (byActor: ActorModel, video: VideoModel, t: Transaction) { | 83 | async function sendCreateView (byActor: ActorModel, video: VideoModel, t: Transaction) { |
84 | logger.info('Creating job to send view of %s.', video.url) | ||
85 | |||
77 | const url = getVideoViewActivityPubUrl(byActor, video) | 86 | const url = getVideoViewActivityPubUrl(byActor, video) |
78 | const viewActivityData = createViewActivityData(byActor, video) | 87 | const viewActivityData = createViewActivityData(byActor, video) |
79 | 88 | ||
@@ -98,6 +107,8 @@ async function sendCreateView (byActor: ActorModel, video: VideoModel, t: Transa | |||
98 | } | 107 | } |
99 | 108 | ||
100 | async function sendCreateDislike (byActor: ActorModel, video: VideoModel, t: Transaction) { | 109 | async function sendCreateDislike (byActor: ActorModel, video: VideoModel, t: Transaction) { |
110 | logger.info('Creating job to dislike %s.', video.url) | ||
111 | |||
101 | const url = getVideoDislikeActivityPubUrl(byActor, video) | 112 | const url = getVideoDislikeActivityPubUrl(byActor, video) |
102 | const dislikeActivityData = createDislikeActivityData(byActor, video) | 113 | const dislikeActivityData = createDislikeActivityData(byActor, video) |
103 | 114 | ||