import * as Sequelize from 'sequelize'
-
-import { database as db } from '../initializers'
+import { VideoChannelCreate } from '../../shared/models'
import { logger } from '../helpers'
+import { database as db } from '../initializers'
import { AccountInstance } from '../models'
-import { VideoChannelCreate } from '../../shared/models'
-import { sendCreateVideoChannel } from './activitypub/send-request'
-import { getActivityPubUrl, shareVideoChannelByServer } from '../helpers/activitypub'
+import { getVideoChannelActivityPubUrl } from '../helpers/activitypub'
async function createVideoChannel (videoChannelInfo: VideoChannelCreate, account: AccountInstance, t: Sequelize.Transaction) {
const videoChannelData = {
}
const videoChannel = db.VideoChannel.build(videoChannelData)
- videoChannel.set('url', getActivityPubUrl('videoChannel', videoChannel.uuid))
+ videoChannel.set('url', getVideoChannelActivityPubUrl(videoChannel))
const options = { transaction: t }
// Do not forget to add Account information to the created video channel
videoChannelCreated.Account = account
- await sendCreateVideoChannel(videoChannelCreated, t)
- await shareVideoChannelByServer(videoChannelCreated, t)
-
+ // No need to seed this empty video channel to followers
return videoChannelCreated
}