aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub/send/send-create.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-07-29 11:59:29 +0200
committerChocobozzz <me@florianbigard.com>2019-07-29 13:40:39 +0200
commit2284f202070aa2e49156cc52b3b1596a7d5aadec (patch)
tree77aeb00016734667f8ff32a98ea8b4a6ed3ca31e /server/lib/activitypub/send/send-create.ts
parent112be80ebdf96ef6a27420c1c6a10097388731a9 (diff)
downloadPeerTube-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.ts5
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
11import { VideoPlaylistModel } from '../../../models/video/video-playlist' 11import { VideoPlaylistModel } from '../../../models/video/video-playlist'
12import { VideoPlaylistPrivacy } from '../../../../shared/models/videos/playlist/video-playlist-privacy.model' 12import { VideoPlaylistPrivacy } from '../../../../shared/models/videos/playlist/video-playlist-privacy.model'
13import { getServerActor } from '../../../helpers/utils' 13import { getServerActor } from '../../../helpers/utils'
14import * as Bluebird from 'bluebird'
14 15
15async function sendCreateVideo (video: VideoModel, t: Transaction) { 16async 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
97function buildCreateActivity (url: string, byActor: ActorModel, object: any, audience?: ActivityAudience): ActivityCreate { 98function buildCreateActivity (url: string, byActor: ActorModel, object: any, audience?: ActivityAudience): ActivityCreate {