From 4fce94e8e77b709e7afe27e02cfa6e5040efb92c Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Mon, 17 Apr 2023 21:43:26 +0800 Subject: [PATCH] Fix some threads suddenly lost inReplyToAccountId half-way --- src/pages/status.jsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/pages/status.jsx b/src/pages/status.jsx index 9c0f3922..beb5bb95 100644 --- a/src/pages/status.jsx +++ b/src/pages/status.jsx @@ -251,6 +251,13 @@ function StatusThread({ closeLink = '/' }) { } else if (status.inReplyToId === heroStatus.id) { // If replying to the hero status, it's a reply, level 1 nestedDescendants.push(status); + } else if ( + !status.inReplyToAccountId && + nestedDescendants.find((s) => s.id === status.inReplyToId) && + status.account.id === heroStatus.account.id + ) { + // If replying to hero's own statuses, it's part of the thread, level 1 + nestedDescendants.push(status); } else { // If replying to someone else, it's a reply to a reply, level 2 const parent = descendants.find((s) => s.id === status.inReplyToId);