]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/user.ts
Add a test for refreshing remote keys
[github/Chocobozzz/PeerTube.git] / server / lib / user.ts
index 6b0fd9b8867499c82d8fed55ef4652f3a84613da..e1892f22c89646b08a68f32ddb6b52985d7f1894 100644 (file)
@@ -10,7 +10,7 @@ import { UserNotificationSettingModel } from '../models/account/user-notificatio
 import { ActorModel } from '../models/activitypub/actor'
 import { MAccountDefault, MActorDefault, MChannelActor } from '../types/models'
 import { MUser, MUserDefault, MUserId } from '../types/models/user'
-import { buildActorInstance, setAsyncActorKeys } from './activitypub/actor'
+import { buildActorInstance, generateAndSaveActorKeys } from './activitypub/actor'
 import { getLocalAccountActivityPubUrl } from './activitypub/url'
 import { Emailer } from './emailer'
 import { LiveManager } from './live-manager'
@@ -55,8 +55,8 @@ async function createUserAccountAndChannelAndPlaylist (parameters: {
   })
 
   const [ accountActorWithKeys, channelActorWithKeys ] = await Promise.all([
-    setAsyncActorKeys(account.Actor),
-    setAsyncActorKeys(videoChannel.Actor)
+    generateAndSaveActorKeys(account.Actor),
+    generateAndSaveActorKeys(videoChannel.Actor)
   ])
 
   account.Actor = accountActorWithKeys
@@ -101,7 +101,7 @@ async function createApplicationActor (applicationId: number) {
     type: 'Application'
   })
 
-  accountCreated.Actor = await setAsyncActorKeys(accountCreated.Actor)
+  accountCreated.Actor = await generateAndSaveActorKeys(accountCreated.Actor)
 
   return accountCreated
 }