mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 19:42:24 +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
20
server/lib/job-queue/handlers/actor-keys.ts
Normal file
20
server/lib/job-queue/handlers/actor-keys.ts
Normal file
|
@ -0,0 +1,20 @@
|
|||
import * as Bull from 'bull'
|
||||
import { generateAndSaveActorKeys } from '@server/lib/activitypub/actor'
|
||||
import { ActorModel } from '@server/models/activitypub/actor'
|
||||
import { ActorKeysPayload } from '@shared/models'
|
||||
import { logger } from '../../../helpers/logger'
|
||||
|
||||
async function processActorKeys (job: Bull.Job) {
|
||||
const payload = job.data as ActorKeysPayload
|
||||
logger.info('Processing email in job %d.', job.id)
|
||||
|
||||
const actor = await ActorModel.load(payload.actorId)
|
||||
|
||||
await generateAndSaveActorKeys(actor)
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export {
|
||||
processActorKeys
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue