-import { sendCreateVideoChannel } from './activitypub/send-request'
-import { getActivityPubUrl } from '../helpers/activitypub'
+import { AccountModel } from '../models/account/account'
+import { VideoChannelModel } from '../models/video/video-channel'
+import { buildActorInstance, federateVideoIfNeeded, getVideoChannelActivityPubUrl } from './activitypub'
+import { VideoModel } from '../models/video/video'
+
+async function createVideoChannel (videoChannelInfo: VideoChannelCreate, account: AccountModel, t: Sequelize.Transaction) {
+ const uuid = uuidv4()
+ const url = getVideoChannelActivityPubUrl(videoChannelInfo.name)
+ const actorInstance = buildActorInstance('Group', url, videoChannelInfo.name, uuid)
+
+ const actorInstanceCreated = await actorInstance.save({ transaction: t })