diff options
Diffstat (limited to 'server/lib/video-channel.ts')
-rw-r--r-- | server/lib/video-channel.ts | 7 |
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 @@ | |||
1 | import * as Sequelize from 'sequelize' | 1 | import * as Sequelize from 'sequelize' |
2 | 2 | ||
3 | import { addVideoChannelToFriends } from './friends' | ||
4 | import { database as db } from '../initializers' | 3 | import { database as db } from '../initializers' |
5 | import { logger } from '../helpers' | 4 | import { logger } from '../helpers' |
6 | import { AccountInstance } from '../models' | 5 | import { AccountInstance } from '../models' |
7 | import { VideoChannelCreate } from '../../shared/models' | 6 | import { VideoChannelCreate } from '../../shared/models' |
7 | import { sendCreateVideoChannel } from './activitypub/send-request' | ||
8 | 8 | ||
9 | async function createVideoChannel (videoChannelInfo: VideoChannelCreate, account: AccountInstance, t: Sequelize.Transaction) { | 9 | async 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 | } |