forked from FoundKeyGang/FoundKey
server: handle users getting deleted somewhere else
I don't know why but several jobs got stuck in my inbox queue because of errors like 'Could not find any entity of type "User" matching...'.
This commit is contained in:
parent
e2ce599aca
commit
1faf1035f9
1 changed files with 6 additions and 1 deletions
|
@ -10,7 +10,12 @@ export async function deleteActor(actor: CacheableRemoteUser, uri: string): Prom
|
||||||
return `skip: delete actor ${actor.uri} !== ${uri}`;
|
return `skip: delete actor ${actor.uri} !== ${uri}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
const user = await Users.findOneByOrFail({ id: actor.id });
|
const user = await Users.findOneBy({ id: actor.id });
|
||||||
|
if (!user) {
|
||||||
|
// maybe a race condition, relay or something else?
|
||||||
|
// anyway, the user is gone now so dont care
|
||||||
|
return 'ok: gone';
|
||||||
|
}
|
||||||
if (user.isDeleted) {
|
if (user.isDeleted) {
|
||||||
apLogger.info('skip: already deleted');
|
apLogger.info('skip: already deleted');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue