diff options
author | Chocobozzz <me@florianbigard.com> | 2021-02-26 14:22:25 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-02-26 14:22:25 +0100 |
commit | 8795d6f254bd8f88c385bf77b82cc6f177c94df9 (patch) | |
tree | 88f8f4fced9e0c12db5b43dcac6e44bd94eb8b1a /server/lib/user.ts | |
parent | 92315d979c3f424d81f8fca3c8831d81e4e2a6d6 (diff) | |
download | PeerTube-8795d6f254bd8f88c385bf77b82cc6f177c94df9.tar.gz PeerTube-8795d6f254bd8f88c385bf77b82cc6f177c94df9.tar.zst PeerTube-8795d6f254bd8f88c385bf77b82cc6f177c94df9.zip |
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
Diffstat (limited to 'server/lib/user.ts')
-rw-r--r-- | server/lib/user.ts | 8 |
1 files changed, 4 insertions, 4 deletions
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 | |||
10 | import { ActorModel } from '../models/activitypub/actor' | 10 | import { ActorModel } from '../models/activitypub/actor' |
11 | import { MAccountDefault, MActorDefault, MChannelActor } from '../types/models' | 11 | import { MAccountDefault, MActorDefault, MChannelActor } from '../types/models' |
12 | import { MUser, MUserDefault, MUserId } from '../types/models/user' | 12 | import { MUser, MUserDefault, MUserId } from '../types/models/user' |
13 | import { buildActorInstance, setAsyncActorKeys } from './activitypub/actor' | 13 | import { buildActorInstance, generateAndSaveActorKeys } from './activitypub/actor' |
14 | import { getLocalAccountActivityPubUrl } from './activitypub/url' | 14 | import { getLocalAccountActivityPubUrl } from './activitypub/url' |
15 | import { Emailer } from './emailer' | 15 | import { Emailer } from './emailer' |
16 | import { LiveManager } from './live-manager' | 16 | import { LiveManager } from './live-manager' |
@@ -55,8 +55,8 @@ async function createUserAccountAndChannelAndPlaylist (parameters: { | |||
55 | }) | 55 | }) |
56 | 56 | ||
57 | const [ accountActorWithKeys, channelActorWithKeys ] = await Promise.all([ | 57 | const [ accountActorWithKeys, channelActorWithKeys ] = await Promise.all([ |
58 | setAsyncActorKeys(account.Actor), | 58 | generateAndSaveActorKeys(account.Actor), |
59 | setAsyncActorKeys(videoChannel.Actor) | 59 | generateAndSaveActorKeys(videoChannel.Actor) |
60 | ]) | 60 | ]) |
61 | 61 | ||
62 | account.Actor = accountActorWithKeys | 62 | account.Actor = accountActorWithKeys |
@@ -101,7 +101,7 @@ async function createApplicationActor (applicationId: number) { | |||
101 | type: 'Application' | 101 | type: 'Application' |
102 | }) | 102 | }) |
103 | 103 | ||
104 | accountCreated.Actor = await setAsyncActorKeys(accountCreated.Actor) | 104 | accountCreated.Actor = await generateAndSaveActorKeys(accountCreated.Actor) |
105 | 105 | ||
106 | return accountCreated | 106 | return accountCreated |
107 | } | 107 | } |