aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/user.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-02-26 14:22:25 +0100
committerChocobozzz <me@florianbigard.com>2021-02-26 14:22:25 +0100
commit8795d6f254bd8f88c385bf77b82cc6f177c94df9 (patch)
tree88f8f4fced9e0c12db5b43dcac6e44bd94eb8b1a /server/lib/user.ts
parent92315d979c3f424d81f8fca3c8831d81e4e2a6d6 (diff)
downloadPeerTube-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.ts8
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
10import { ActorModel } from '../models/activitypub/actor' 10import { ActorModel } from '../models/activitypub/actor'
11import { MAccountDefault, MActorDefault, MChannelActor } from '../types/models' 11import { MAccountDefault, MActorDefault, MChannelActor } from '../types/models'
12import { MUser, MUserDefault, MUserId } from '../types/models/user' 12import { MUser, MUserDefault, MUserId } from '../types/models/user'
13import { buildActorInstance, setAsyncActorKeys } from './activitypub/actor' 13import { buildActorInstance, generateAndSaveActorKeys } from './activitypub/actor'
14import { getLocalAccountActivityPubUrl } from './activitypub/url' 14import { getLocalAccountActivityPubUrl } from './activitypub/url'
15import { Emailer } from './emailer' 15import { Emailer } from './emailer'
16import { LiveManager } from './live-manager' 16import { 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}