X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Fvideo-channel.ts;h=49bdf4869d506ba9de3f18eee66af44761e14705;hb=de94ac86a211dec657332d964693857ec235ce40;hp=14829c9d6506349374015f1c5f8532f309c5c5c2;hpb=818c449b3c34e9f324ac744120c8774e724ab25e;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/video-channel.ts b/server/lib/video-channel.ts index 14829c9d6..49bdf4869 100644 --- a/server/lib/video-channel.ts +++ b/server/lib/video-channel.ts @@ -1,10 +1,12 @@ import * as Sequelize from 'sequelize' -import * as uuidv4 from 'uuid/v4' +import { v4 as uuidv4 } from 'uuid' import { VideoChannelCreate } from '../../shared/models' -import { VideoChannelModel } from '../models/video/video-channel' -import { buildActorInstance, federateVideoIfNeeded, getVideoChannelActivityPubUrl } from './activitypub' import { VideoModel } from '../models/video/video' -import { MAccountId, MChannelDefault, MChannelId } from '../typings/models' +import { VideoChannelModel } from '../models/video/video-channel' +import { MAccountId, MChannelDefault, MChannelId } from '../types/models' +import { buildActorInstance } from './activitypub/actor' +import { getLocalVideoChannelActivityPubUrl } from './activitypub/url' +import { federateVideoIfNeeded } from './activitypub/videos' type CustomVideoChannelModelAccount = MChannelDefault & { Account?: T } @@ -14,7 +16,7 @@ async function createLocalVideoChannel ( t: Sequelize.Transaction ): Promise> { const uuid = uuidv4() - const url = getVideoChannelActivityPubUrl(videoChannelInfo.name) + const url = getLocalVideoChannelActivityPubUrl(videoChannelInfo.name) const actorInstance = buildActorInstance('Group', url, videoChannelInfo.name, uuid) const actorInstanceCreated = await actorInstance.save({ transaction: t })