aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/video-channel.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/video-channel.ts')
-rw-r--r--server/lib/video-channel.ts7
1 files changed, 2 insertions, 5 deletions
diff --git a/server/lib/video-channel.ts b/server/lib/video-channel.ts
index f81383ce8..459d9d4a8 100644
--- a/server/lib/video-channel.ts
+++ b/server/lib/video-channel.ts
@@ -1,10 +1,10 @@
1import * as Sequelize from 'sequelize' 1import * as Sequelize from 'sequelize'
2 2
3import { addVideoChannelToFriends } from './friends'
4import { database as db } from '../initializers' 3import { database as db } from '../initializers'
5import { logger } from '../helpers' 4import { logger } from '../helpers'
6import { AccountInstance } from '../models' 5import { AccountInstance } from '../models'
7import { VideoChannelCreate } from '../../shared/models' 6import { VideoChannelCreate } from '../../shared/models'
7import { sendCreateVideoChannel } from './activitypub/send-request'
8 8
9async function createVideoChannel (videoChannelInfo: VideoChannelCreate, account: AccountInstance, t: Sequelize.Transaction) { 9async function createVideoChannel (videoChannelInfo: VideoChannelCreate, account: AccountInstance, t: Sequelize.Transaction) {
10 const videoChannelData = { 10 const videoChannelData = {
@@ -22,10 +22,7 @@ async function createVideoChannel (videoChannelInfo: VideoChannelCreate, account
22 // Do not forget to add Account information to the created video channel 22 // Do not forget to add Account information to the created video channel
23 videoChannelCreated.Account = account 23 videoChannelCreated.Account = account
24 24
25 const remoteVideoChannel = videoChannelCreated.toAddRemoteJSON() 25 sendCreateVideoChannel(videoChannelCreated, t)
26
27 // Now we'll add the video channel's meta data to our friends
28 await addVideoChannelToFriends(remoteVideoChannel, t)
29 26
30 return videoChannelCreated 27 return videoChannelCreated
31} 28}