Search video channel handle/uri
[oweals/peertube.git] / server / lib / video-channel.ts
index 9f7ed929738c56d7f915cb59d70279b5afd6debd..0fe95ca0986d41fc863ea6afb2f8f60daee37751 100644 (file)
@@ -7,14 +7,13 @@ import { buildActorInstance, getVideoChannelActivityPubUrl } from './activitypub
 
 async function createVideoChannel (videoChannelInfo: VideoChannelCreate, account: AccountModel, t: Sequelize.Transaction) {
   const uuid = uuidv4()
-  const url = getVideoChannelActivityPubUrl(uuid)
-  // We use the name as uuid
-  const actorInstance = buildActorInstance('Group', url, uuid, uuid)
+  const url = getVideoChannelActivityPubUrl(videoChannelInfo.name)
+  const actorInstance = buildActorInstance('Group', url, videoChannelInfo.name, uuid)
 
   const actorInstanceCreated = await actorInstance.save({ transaction: t })
 
   const videoChannelData = {
-    name: videoChannelInfo.name,
+    name: videoChannelInfo.displayName,
     description: videoChannelInfo.description,
     support: videoChannelInfo.support,
     accountId: account.id,