]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/user.ts
Use different p2p policy for embeds and webapp
[github/Chocobozzz/PeerTube.git] / server / lib / user.ts
index 8820e82431538ab8bb4ad3ee2f436e7fe7d9e332..230bf37d0f55cb1351de2603900ec4dd01870412 100644 (file)
@@ -1,5 +1,5 @@
 import { Transaction } from 'sequelize/types'
-import { v4 as uuidv4 } from 'uuid'
+import { buildUUID } from '@shared/core-utils/uuid'
 import { UserModel } from '@server/models/user/user'
 import { MActorDefault } from '@server/types/models/actor'
 import { ActivityPubActorType } from '../../shared/models/activitypub'
@@ -210,7 +210,7 @@ async function buildChannelAttributes (user: MUser, transaction?: Transaction, c
 
   // Conflict, generate uuid instead
   const actor = await ActorModel.loadLocalByName(channelName, transaction)
-  if (actor) channelName = uuidv4()
+  if (actor) channelName = buildUUID()
 
   const videoChannelDisplayName = `Main ${user.username} channel`