diff options
author | Chocobozzz <me@florianbigard.com> | 2019-07-29 11:59:29 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-07-29 13:40:39 +0200 |
commit | 2284f202070aa2e49156cc52b3b1596a7d5aadec (patch) | |
tree | 77aeb00016734667f8ff32a98ea8b4a6ed3ca31e /server/lib/activitypub/send/send-create.ts | |
parent | 112be80ebdf96ef6a27420c1c6a10097388731a9 (diff) | |
download | PeerTube-2284f202070aa2e49156cc52b3b1596a7d5aadec.tar.gz PeerTube-2284f202070aa2e49156cc52b3b1596a7d5aadec.tar.zst PeerTube-2284f202070aa2e49156cc52b3b1596a7d5aadec.zip |
Add gitlab ci support
Diffstat (limited to 'server/lib/activitypub/send/send-create.ts')
-rw-r--r-- | server/lib/activitypub/send/send-create.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/lib/activitypub/send/send-create.ts b/server/lib/activitypub/send/send-create.ts index 28f18595b..9c21149f2 100644 --- a/server/lib/activitypub/send/send-create.ts +++ b/server/lib/activitypub/send/send-create.ts | |||
@@ -11,6 +11,7 @@ import { VideoRedundancyModel } from '../../../models/redundancy/video-redundanc | |||
11 | import { VideoPlaylistModel } from '../../../models/video/video-playlist' | 11 | import { VideoPlaylistModel } from '../../../models/video/video-playlist' |
12 | import { VideoPlaylistPrivacy } from '../../../../shared/models/videos/playlist/video-playlist-privacy.model' | 12 | import { VideoPlaylistPrivacy } from '../../../../shared/models/videos/playlist/video-playlist-privacy.model' |
13 | import { getServerActor } from '../../../helpers/utils' | 13 | import { getServerActor } from '../../../helpers/utils' |
14 | import * as Bluebird from 'bluebird' | ||
14 | 15 | ||
15 | async function sendCreateVideo (video: VideoModel, t: Transaction) { | 16 | async function sendCreateVideo (video: VideoModel, t: Transaction) { |
16 | if (video.privacy === VideoPrivacy.PRIVATE) return undefined | 17 | if (video.privacy === VideoPrivacy.PRIVATE) return undefined |
@@ -82,7 +83,7 @@ async function sendCreateVideoComment (comment: VideoCommentModel, t: Transactio | |||
82 | 83 | ||
83 | // This was a reply, send it to the parent actors | 84 | // This was a reply, send it to the parent actors |
84 | const actorsException = [ byActor ] | 85 | const actorsException = [ byActor ] |
85 | await broadcastToActors(createActivity, byActor, parentsCommentActors, actorsException) | 86 | await broadcastToActors(createActivity, byActor, parentsCommentActors, t, actorsException) |
86 | 87 | ||
87 | // Broadcast to our followers | 88 | // Broadcast to our followers |
88 | await broadcastToFollowers(createActivity, byActor, [ byActor ], t) | 89 | await broadcastToFollowers(createActivity, byActor, [ byActor ], t) |
@@ -91,7 +92,7 @@ async function sendCreateVideoComment (comment: VideoCommentModel, t: Transactio | |||
91 | if (isOrigin) return broadcastToFollowers(createActivity, byActor, actorsInvolvedInComment, t, actorsException) | 92 | if (isOrigin) return broadcastToFollowers(createActivity, byActor, actorsInvolvedInComment, t, actorsException) |
92 | 93 | ||
93 | // Send to origin | 94 | // Send to origin |
94 | return unicastTo(createActivity, byActor, comment.Video.VideoChannel.Account.Actor.sharedInboxUrl) | 95 | t.afterCommit(() => unicastTo(createActivity, byActor, comment.Video.VideoChannel.Account.Actor.sharedInboxUrl)) |
95 | } | 96 | } |
96 | 97 | ||
97 | function buildCreateActivity (url: string, byActor: ActorModel, object: any, audience?: ActivityAudience): ActivityCreate { | 98 | function buildCreateActivity (url: string, byActor: ActorModel, object: any, audience?: ActivityAudience): ActivityCreate { |