aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/video-channel.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-11-20 11:21:08 +0100
committerChocobozzz <me@florianbigard.com>2020-11-20 11:21:08 +0100
commitde94ac86a211dec657332d964693857ec235ce40 (patch)
tree3bff96a40e7c862d83561a26249992b07331b0a2 /server/lib/video-channel.ts
parent3fba4b6bce69247b1d37f923894d8f44818a891c (diff)
downloadPeerTube-de94ac86a211dec657332d964693857ec235ce40.tar.gz
PeerTube-de94ac86a211dec657332d964693857ec235ce40.tar.zst
PeerTube-de94ac86a211dec657332d964693857ec235ce40.zip
Fix incorrect IDs in AP federation
Diffstat (limited to 'server/lib/video-channel.ts')
-rw-r--r--server/lib/video-channel.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/lib/video-channel.ts b/server/lib/video-channel.ts
index 8928dda12..49bdf4869 100644
--- a/server/lib/video-channel.ts
+++ b/server/lib/video-channel.ts
@@ -1,11 +1,11 @@
1import * as Sequelize from 'sequelize' 1import * as Sequelize from 'sequelize'
2import { v4 as uuidv4 } from 'uuid' 2import { v4 as uuidv4 } from 'uuid'
3import { VideoChannelCreate } from '../../shared/models' 3import { VideoChannelCreate } from '../../shared/models'
4import { VideoChannelModel } from '../models/video/video-channel'
5import { buildActorInstance } from './activitypub/actor'
6import { VideoModel } from '../models/video/video' 4import { VideoModel } from '../models/video/video'
5import { VideoChannelModel } from '../models/video/video-channel'
7import { MAccountId, MChannelDefault, MChannelId } from '../types/models' 6import { MAccountId, MChannelDefault, MChannelId } from '../types/models'
8import { getVideoChannelActivityPubUrl } from './activitypub/url' 7import { buildActorInstance } from './activitypub/actor'
8import { getLocalVideoChannelActivityPubUrl } from './activitypub/url'
9import { federateVideoIfNeeded } from './activitypub/videos' 9import { federateVideoIfNeeded } from './activitypub/videos'
10 10
11type CustomVideoChannelModelAccount <T extends MAccountId> = MChannelDefault & { Account?: T } 11type CustomVideoChannelModelAccount <T extends MAccountId> = MChannelDefault & { Account?: T }
@@ -16,7 +16,7 @@ async function createLocalVideoChannel <T extends MAccountId> (
16 t: Sequelize.Transaction 16 t: Sequelize.Transaction
17): Promise<CustomVideoChannelModelAccount<T>> { 17): Promise<CustomVideoChannelModelAccount<T>> {
18 const uuid = uuidv4() 18 const uuid = uuidv4()
19 const url = getVideoChannelActivityPubUrl(videoChannelInfo.name) 19 const url = getLocalVideoChannelActivityPubUrl(videoChannelInfo.name)
20 const actorInstance = buildActorInstance('Group', url, videoChannelInfo.name, uuid) 20 const actorInstance = buildActorInstance('Group', url, videoChannelInfo.name, uuid)
21 21
22 const actorInstanceCreated = await actorInstance.save({ transaction: t }) 22 const actorInstanceCreated = await actorInstance.save({ transaction: t })