]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/video-channel.ts
Refractor activities sending
[github/Chocobozzz/PeerTube.git] / server / lib / video-channel.ts
index 569b8f29d79667203ccdb3b37ad55347c2b06603..0fe95ca0986d41fc863ea6afb2f8f60daee37751 100644 (file)
@@ -7,15 +7,15 @@ 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,
     actorId: actorInstanceCreated.id
   }