Fix deleting an unknown actor

This commit is contained in:
Chocobozzz 2024-09-25 10:07:14 +02:00
parent d69dbe0f2b
commit 7e9fba3ae5
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 1 additions and 0 deletions

View File

@ -27,6 +27,7 @@ async function processDeleteActivity (options: APProcessorOptions<ActivityDelete
if (activity.actor === objectUrl) {
// We need more attributes (all the account and channel)
const byActorFull = await ActorModel.loadByUrlAndPopulateAccountAndChannel(byActor.url)
if (!byActorFull) return
if (isAccountActor(byActorFull.type)) {
if (!byActorFull.Account) throw new Error(`Actor ${byActorFull.url} is a person but we cannot find the account in database.`)