diff options
author | Chocobozzz <me@florianbigard.com> | 2020-11-20 11:21:08 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-11-20 11:21:08 +0100 |
commit | de94ac86a211dec657332d964693857ec235ce40 (patch) | |
tree | 3bff96a40e7c862d83561a26249992b07331b0a2 /server/lib/video-channel.ts | |
parent | 3fba4b6bce69247b1d37f923894d8f44818a891c (diff) | |
download | PeerTube-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.ts | 8 |
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 @@ | |||
1 | import * as Sequelize from 'sequelize' | 1 | import * as Sequelize from 'sequelize' |
2 | import { v4 as uuidv4 } from 'uuid' | 2 | import { v4 as uuidv4 } from 'uuid' |
3 | import { VideoChannelCreate } from '../../shared/models' | 3 | import { VideoChannelCreate } from '../../shared/models' |
4 | import { VideoChannelModel } from '../models/video/video-channel' | ||
5 | import { buildActorInstance } from './activitypub/actor' | ||
6 | import { VideoModel } from '../models/video/video' | 4 | import { VideoModel } from '../models/video/video' |
5 | import { VideoChannelModel } from '../models/video/video-channel' | ||
7 | import { MAccountId, MChannelDefault, MChannelId } from '../types/models' | 6 | import { MAccountId, MChannelDefault, MChannelId } from '../types/models' |
8 | import { getVideoChannelActivityPubUrl } from './activitypub/url' | 7 | import { buildActorInstance } from './activitypub/actor' |
8 | import { getLocalVideoChannelActivityPubUrl } from './activitypub/url' | ||
9 | import { federateVideoIfNeeded } from './activitypub/videos' | 9 | import { federateVideoIfNeeded } from './activitypub/videos' |
10 | 10 | ||
11 | type CustomVideoChannelModelAccount <T extends MAccountId> = MChannelDefault & { Account?: T } | 11 | type 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 }) |