From 8795d6f254bd8f88c385bf77b82cc6f177c94df9 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 26 Feb 2021 14:22:25 +0100 Subject: Fix broken local actors Some channels can't federate because they don't have public/private keys, maybe because the generation failed for various reasons --- server/lib/user.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'server/lib/user.ts') 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 } -- cgit v1.2.3