Skip to content

Node.js based forum software built for the modern web

fix: add missing unlock in nested try/catch

Barış Soner Uşaklı9184a7a4cc8c
diff --git a/src/activitypub/notes.js b/src/activitypub/notes.js
index 466de29877..d485fdd256 100644
--- a/src/activitypub/notes.js
+++ b/src/activitypub/notes.js
@@ -231,6 +231,7 @@ Notes.assert = async (uid, input, options = { skipChecks: false }) => {
unprocessed.shift();
} catch (e) {
activitypub.helpers.log(`[activitypub/notes.assert] Could not post topic (${mainPost.pid}): ${e.message}`);
+ await unlock(id);
return null;
}