X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Flib%2Fuser.ts;h=e1892f22c89646b08a68f32ddb6b52985d7f1894;hb=8795d6f254bd8f88c385bf77b82cc6f177c94df9;hp=6b0fd9b8867499c82d8fed55ef4652f3a84613da;hpb=de94ac86a211dec657332d964693857ec235ce40;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/lib/user.ts b/server/lib/user.ts index 6b0fd9b88..e1892f22c 100644 --- a/server/lib/user.ts +++ b/server/lib/user.ts @@ -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 }