mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 09:06:15 +01:00
fix: on user deletion during assertion (due to 410), if delete fails, just run ap post-deletion to clean up
This commit is contained in:
@@ -149,7 +149,11 @@ Actors.assert = async (ids, options = {}) => {
|
|||||||
if (e.code === 'ap_get_410') {
|
if (e.code === 'ap_get_410') {
|
||||||
const exists = await user.exists(id);
|
const exists = await user.exists(id);
|
||||||
if (exists) {
|
if (exists) {
|
||||||
|
try {
|
||||||
await user.deleteAccount(id);
|
await user.deleteAccount(id);
|
||||||
|
} catch (e) {
|
||||||
|
await activitypub.actors.remove(iid);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user