Skip to content

Node.js based forum software built for the modern web

fix: dont show delete posts on profile

Barış Soner Uşaklıe48c7cd71786
diff --git a/src/controllers/accounts/profile.js b/src/controllers/accounts/profile.js
index 2f8a60d31f..5907a0e115 100644
--- a/src/controllers/accounts/profile.js
+++ b/src/controllers/accounts/profile.js
@@ -122,6 +122,10 @@ function getPosts(callerUid, userData, setSuffix, callback) {
function (pids, next) {
posts.getPostSummaryByPids(pids, callerUid, { stripTags: false }, next);
},
+ function (posts, next) {
+ posts = posts.filter(p => p && !p.deleted);
+ next(null, posts);
+ },
], callback);
}