aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers')
-rw-r--r--server/controllers/api/videos/index.ts10
1 files changed, 7 insertions, 3 deletions
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts
index d6934748f..3e65e844b 100644
--- a/server/controllers/api/videos/index.ts
+++ b/server/controllers/api/videos/index.ts
@@ -21,7 +21,11 @@ import {
21 VIDEO_MIMETYPE_EXT, 21 VIDEO_MIMETYPE_EXT,
22 VIDEO_PRIVACIES 22 VIDEO_PRIVACIES
23} from '../../../initializers' 23} from '../../../initializers'
24import { fetchRemoteVideoDescription, getVideoActivityPubUrl, shareVideoByServer } from '../../../lib/activitypub' 24import {
25 fetchRemoteVideoDescription,
26 getVideoActivityPubUrl,
27 shareVideoByServerAndChannel
28} from '../../../lib/activitypub'
25import { sendCreateVideo, sendCreateViewToOrigin, sendCreateViewToVideoFollowers, sendUpdateVideo } from '../../../lib/activitypub/send' 29import { sendCreateVideo, sendCreateViewToOrigin, sendCreateViewToVideoFollowers, sendUpdateVideo } from '../../../lib/activitypub/send'
26import { transcodingJobScheduler } from '../../../lib/jobs/transcoding-job-scheduler' 30import { transcodingJobScheduler } from '../../../lib/jobs/transcoding-job-scheduler'
27import { 31import {
@@ -249,7 +253,7 @@ async function addVideo (req: express.Request, res: express.Response, videoPhysi
249 253
250 await sendCreateVideo(video, t) 254 await sendCreateVideo(video, t)
251 // TODO: share by video channel 255 // TODO: share by video channel
252 await shareVideoByServer(video, t) 256 await shareVideoByServerAndChannel(video, t)
253 257
254 logger.info('Video with name %s and uuid %s created.', videoInfo.name, videoCreated.uuid) 258 logger.info('Video with name %s and uuid %s created.', videoInfo.name, videoCreated.uuid)
255 259
@@ -306,7 +310,7 @@ async function updateVideo (req: express.Request, res: express.Response) {
306 if (wasPrivateVideo === true && videoInstanceUpdated.privacy !== VideoPrivacy.PRIVATE) { 310 if (wasPrivateVideo === true && videoInstanceUpdated.privacy !== VideoPrivacy.PRIVATE) {
307 await sendCreateVideo(videoInstanceUpdated, t) 311 await sendCreateVideo(videoInstanceUpdated, t)
308 // TODO: Send by video channel 312 // TODO: Send by video channel
309 await shareVideoByServer(videoInstanceUpdated, t) 313 await shareVideoByServerAndChannel(videoInstanceUpdated, t)
310 } 314 }
311 }) 315 })
312 316