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.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/server/lib/video-channel.ts b/server/lib/video-channel.ts
index ee8eb6568..41eab456b 100644
--- a/server/lib/video-channel.ts
+++ b/server/lib/video-channel.ts
@@ -4,12 +4,12 @@ import { VideoChannelCreate } from '../../shared/models'
4import { VideoChannelModel } from '../models/video/video-channel' 4import { VideoChannelModel } from '../models/video/video-channel'
5import { buildActorInstance, federateVideoIfNeeded, getVideoChannelActivityPubUrl } from './activitypub' 5import { buildActorInstance, federateVideoIfNeeded, getVideoChannelActivityPubUrl } from './activitypub'
6import { VideoModel } from '../models/video/video' 6import { VideoModel } from '../models/video/video'
7import { MAccountId, MChannelActor, MChannelId } from '../typings/models' 7import { MAccountId, MChannelDefault, MChannelId } from '../typings/models'
8 8
9type CustomVideoChannelModelAccount <T extends MAccountId> = MChannelActor & 9type CustomVideoChannelModelAccount <T extends MAccountId> = MChannelDefault &
10 { Account?: T } 10 { Account?: T }
11 11
12async function createVideoChannel <T extends MAccountId> ( 12async function createLocalVideoChannel <T extends MAccountId> (
13 videoChannelInfo: VideoChannelCreate, 13 videoChannelInfo: VideoChannelCreate,
14 account: T, 14 account: T,
15 t: Sequelize.Transaction 15 t: Sequelize.Transaction
@@ -31,7 +31,7 @@ async function createVideoChannel <T extends MAccountId> (
31 const videoChannel = new VideoChannelModel(videoChannelData) 31 const videoChannel = new VideoChannelModel(videoChannelData)
32 32
33 const options = { transaction: t } 33 const options = { transaction: t }
34 const videoChannelCreated: CustomVideoChannelModelAccount<T> = await videoChannel.save(options) as MChannelActor 34 const videoChannelCreated: CustomVideoChannelModelAccount<T> = await videoChannel.save(options) as MChannelDefault
35 35
36 // Do not forget to add Account/Actor information to the created video channel 36 // Do not forget to add Account/Actor information to the created video channel
37 videoChannelCreated.Account = account 37 videoChannelCreated.Account = account
@@ -54,6 +54,6 @@ async function federateAllVideosOfChannel (videoChannel: MChannelId) {
54// --------------------------------------------------------------------------- 54// ---------------------------------------------------------------------------
55 55
56export { 56export {
57 createVideoChannel, 57 createLocalVideoChannel,
58 federateAllVideosOfChannel 58 federateAllVideosOfChannel
59} 59}