From 5dba7f266793d0d1dbcfefeade4b291017d1f441 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Espino=20Garc=C3=ADa?= Date: Fri, 20 May 2022 13:12:22 +0200 Subject: [PATCH] Properly handle deleted system posts (#6297) --- app/utils/post_list/index.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/utils/post_list/index.ts b/app/utils/post_list/index.ts index f9b17e4146..0be1911ee5 100644 --- a/app/utils/post_list/index.ts +++ b/app/utils/post_list/index.ts @@ -67,6 +67,11 @@ function combineUserActivityPosts(orderedPosts: Array) { continue; } + } else if (post.deleteAt) { + out.push(post); + + lastPostIsUserActivity = false; + combinedCount = 0; } else { const postIsUserActivity = Post.USER_ACTIVITY_POST_TYPES.includes(post.type); if (postIsUserActivity && lastPostIsUserActivity && combinedCount < MAX_COMBINED_SYSTEM_POSTS) {