Fix deleting an unknown actor
This commit is contained in:
parent
d69dbe0f2b
commit
7e9fba3ae5
|
@ -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.`)
|
||||
|
|
Loading…
Reference in New Issue