aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub/share.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-03-27 13:33:56 +0200
committerChocobozzz <me@florianbigard.com>2018-03-27 13:33:56 +0200
commit07197db4c567f22bbc9c12339062896dc76bac2f (patch)
tree5682f0d88fc1b4032018e5122ed42eb9967fd743 /server/lib/activitypub/share.ts
parentda99ccf2681bcbc172a96cf30e7b733948767faa (diff)
downloadPeerTube-07197db4c567f22bbc9c12339062896dc76bac2f.tar.gz
PeerTube-07197db4c567f22bbc9c12339062896dc76bac2f.tar.zst
PeerTube-07197db4c567f22bbc9c12339062896dc76bac2f.zip
Try to refractor activities sending
There is still a need for work on this part though
Diffstat (limited to 'server/lib/activitypub/share.ts')
-rw-r--r--server/lib/activitypub/share.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/lib/activitypub/share.ts b/server/lib/activitypub/share.ts
index 038f19b7d..f256f8d21 100644
--- a/server/lib/activitypub/share.ts
+++ b/server/lib/activitypub/share.ts
@@ -3,7 +3,7 @@ import { VideoPrivacy } from '../../../shared/models/videos'
3import { getServerActor } from '../../helpers/utils' 3import { getServerActor } from '../../helpers/utils'
4import { VideoModel } from '../../models/video/video' 4import { VideoModel } from '../../models/video/video'
5import { VideoShareModel } from '../../models/video/video-share' 5import { VideoShareModel } from '../../models/video/video-share'
6import { sendVideoAnnounceToFollowers } from './send' 6import { sendVideoAnnounce } from './send'
7import { getAnnounceActivityPubUrl } from './url' 7import { getAnnounceActivityPubUrl } from './url'
8 8
9async function shareVideoByServerAndChannel (video: VideoModel, t: Transaction) { 9async function shareVideoByServerAndChannel (video: VideoModel, t: Transaction) {
@@ -23,7 +23,7 @@ async function shareVideoByServerAndChannel (video: VideoModel, t: Transaction)
23 }, 23 },
24 transaction: t 24 transaction: t
25 }).then(([ serverShare, created ]) => { 25 }).then(([ serverShare, created ]) => {
26 if (created) return sendVideoAnnounceToFollowers(serverActor, serverShare, video, t) 26 if (created) return sendVideoAnnounce(serverActor, serverShare, video, t)
27 27
28 return undefined 28 return undefined
29 }) 29 })
@@ -40,7 +40,7 @@ async function shareVideoByServerAndChannel (video: VideoModel, t: Transaction)
40 }, 40 },
41 transaction: t 41 transaction: t
42 }).then(([ videoChannelShare, created ]) => { 42 }).then(([ videoChannelShare, created ]) => {
43 if (created) return sendVideoAnnounceToFollowers(serverActor, videoChannelShare, video, t) 43 if (created) return sendVideoAnnounce(serverActor, videoChannelShare, video, t)
44 44
45 return undefined 45 return undefined
46 }) 46 })