Skip to content

Node.js based forum software built for the modern web

fix: clear parsed post cache when updating a post's attachments, #13164

Julian Lam33d7b9b3ab58
diff --git a/src/posts/attachments.js b/src/posts/attachments.js
index 3683aa0de4..99aece3010 100644
--- a/src/posts/attachments.js
+++ b/src/posts/attachments.js
@@ -63,6 +63,7 @@ Attachments.update = async (pid, attachments) => {
await Promise.all([
db.setObjectBulk(bulkOps.hash),
db.setObjectField(`post:${pid}`, 'attachments', hashes.join(',')),
+ posts.clearCachedPost(pid),
]);
};