mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 02:09:37 +02:00
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
This commit is contained in:
parent
92315d979c
commit
8795d6f254
11 changed files with 90 additions and 26 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue