Skip to content

Node.js based forum software built for the modern web

fix: on user deletion during assertion (due to 410), if delete fails, just run ap post-deletion to clean up

Julian Lam4bbe27d44c3d
diff --git a/src/activitypub/actors.js b/src/activitypub/actors.js
index c9e6db7f2f..3d3c903e34 100644
--- a/src/activitypub/actors.js
+++ b/src/activitypub/actors.js
@@ -149,7 +149,11 @@ Actors.assert = async (ids, options = {}) => {
if (e.code === 'ap_get_410') {
const exists = await user.exists(id);
if (exists) {
- await user.deleteAccount(id);
+ try {
+ await user.deleteAccount(id);
+ } catch (e) {
+ await activitypub.actors.remove(iid);
+ }
}
}