mirror of https://github.com/Chocobozzz/PeerTube
Fix deleting an unknown actor
parent
d69dbe0f2b
commit
7e9fba3ae5
|
@ -27,6 +27,7 @@ async function processDeleteActivity (options: APProcessorOptions<ActivityDelete
|
||||||
if (activity.actor === objectUrl) {
|
if (activity.actor === objectUrl) {
|
||||||
// We need more attributes (all the account and channel)
|
// We need more attributes (all the account and channel)
|
||||||
const byActorFull = await ActorModel.loadByUrlAndPopulateAccountAndChannel(byActor.url)
|
const byActorFull = await ActorModel.loadByUrlAndPopulateAccountAndChannel(byActor.url)
|
||||||
|
if (!byActorFull) return
|
||||||
|
|
||||||
if (isAccountActor(byActorFull.type)) {
|
if (isAccountActor(byActorFull.type)) {
|
||||||
if (!byActorFull.Account) throw new Error(`Actor ${byActorFull.url} is a person but we cannot find the account in database.`)
|
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