diff options
Diffstat (limited to 'server/lib')
-rw-r--r-- | server/lib/user.ts | 3 | ||||
-rw-r--r-- | server/lib/video-channel.ts | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/server/lib/user.ts b/server/lib/user.ts index 1094c2401..d2d599dfd 100644 --- a/server/lib/user.ts +++ b/server/lib/user.ts | |||
@@ -16,8 +16,9 @@ async function createUserAccountAndChannel (user: UserInstance, validateUser = t | |||
16 | const userCreated = await user.save(userOptions) | 16 | const userCreated = await user.save(userOptions) |
17 | const accountCreated = await createLocalAccount(user.username, user.id, null, t) | 17 | const accountCreated = await createLocalAccount(user.username, user.id, null, t) |
18 | 18 | ||
19 | const videoChannelName = `Default ${userCreated.username} channel` | ||
19 | const videoChannelInfo = { | 20 | const videoChannelInfo = { |
20 | name: `Default ${userCreated.username} channel` | 21 | name: videoChannelName |
21 | } | 22 | } |
22 | const videoChannel = await createVideoChannel(videoChannelInfo, accountCreated, t) | 23 | const videoChannel = await createVideoChannel(videoChannelInfo, accountCreated, t) |
23 | 24 | ||
diff --git a/server/lib/video-channel.ts b/server/lib/video-channel.ts index 459d9d4a8..13841ea33 100644 --- a/server/lib/video-channel.ts +++ b/server/lib/video-channel.ts | |||
@@ -5,6 +5,7 @@ import { logger } from '../helpers' | |||
5 | import { AccountInstance } from '../models' | 5 | import { AccountInstance } from '../models' |
6 | import { VideoChannelCreate } from '../../shared/models' | 6 | import { VideoChannelCreate } from '../../shared/models' |
7 | import { sendCreateVideoChannel } from './activitypub/send-request' | 7 | import { sendCreateVideoChannel } from './activitypub/send-request' |
8 | import { getActivityPubUrl } from '../helpers/activitypub' | ||
8 | 9 | ||
9 | async function createVideoChannel (videoChannelInfo: VideoChannelCreate, account: AccountInstance, t: Sequelize.Transaction) { | 10 | async function createVideoChannel (videoChannelInfo: VideoChannelCreate, account: AccountInstance, t: Sequelize.Transaction) { |
10 | const videoChannelData = { | 11 | const videoChannelData = { |
@@ -15,6 +16,8 @@ async function createVideoChannel (videoChannelInfo: VideoChannelCreate, account | |||
15 | } | 16 | } |
16 | 17 | ||
17 | const videoChannel = db.VideoChannel.build(videoChannelData) | 18 | const videoChannel = db.VideoChannel.build(videoChannelData) |
19 | videoChannel.set('url', getActivityPubUrl('videoChannel', videoChannel.uuid)) | ||
20 | |||
18 | const options = { transaction: t } | 21 | const options = { transaction: t } |
19 | 22 | ||
20 | const videoChannelCreated = await videoChannel.save(options) | 23 | const videoChannelCreated = await videoChannel.save(options) |