Handle remote user deletions

This commit is contained in:
Andrew Godwin 2022-11-20 12:51:15 -07:00
parent 2d7f33879f
commit 94d92fdf8a

View File

@ -327,6 +327,10 @@ class Identity(StatorModel):
) )
except httpx.RequestError: except httpx.RequestError:
return False return False
if response.status_code == 410:
# Their account got deleted, so let's do the same.
await Identity.objects.filter(pk=self.pk).adelete()
return False
if response.status_code >= 400: if response.status_code >= 400:
return False return False
document = canonicalise(response.json(), include_security=True) document = canonicalise(response.json(), include_security=True)