From 35a8641f1608b8ca8809d35e05766c6ec6279e74 Mon Sep 17 00:00:00 2001
From: Lim Chee Aun <cheeaun@gmail.com>
Date: Sun, 26 Mar 2023 15:09:45 +0800
Subject: [PATCH] Make filtered status work for boosts too

---
 src/components/status.jsx | 22 +++++++++++++++++++---
 1 file changed, 19 insertions(+), 3 deletions(-)

diff --git a/src/components/status.jsx b/src/components/status.jsx
index 73d33021..9e2658a4 100644
--- a/src/components/status.jsx
+++ b/src/components/status.jsx
@@ -1728,10 +1728,12 @@ function FilteredStatus({ status, filterInfo, instance, containerProps = {} }) {
     account: { avatar, avatarStatic },
     createdAt,
     visibility,
+    reblog,
   } = status;
+  const isReblog = !!reblog;
   const filterTitleStr = filterInfo?.titlesStr || '';
   const createdAtDate = new Date(createdAt);
-  const statusPeekText = statusPeek(status);
+  const statusPeekText = statusPeek(status.reblog || status);
 
   const [showPeek, setShowPeek] = useState(false);
   const bindLongPress = useLongPress(
@@ -1747,6 +1749,7 @@ function FilteredStatus({ status, filterInfo, instance, containerProps = {} }) {
 
   return (
     <div
+      class={isReblog ? 'status-reblog' : ''}
       {...containerProps}
       title={statusPeekText}
       onContextMenu={(e) => {
@@ -1776,9 +1779,22 @@ function FilteredStatus({ status, filterInfo, instance, containerProps = {} }) {
               alt={visibilityText[visibility]}
               size="s"
             />{' '}
-            <RelativeTime datetime={createdAtDate} format="micro" />
+            {isReblog ? (
+              'boosted'
+            ) : (
+              <RelativeTime datetime={createdAtDate} format="micro" />
+            )}
+          </span>
+          <span class="status-filtered-info-2">
+            {isReblog && (
+              <>
+                <Avatar
+                  url={reblog.account.avatarStatic || reblog.account.avatar}
+                />{' '}
+              </>
+            )}
+            {statusPeekText}
           </span>
-          <span class="status-filtered-info-2">{statusPeekText}</span>
         </span>
       </article>
       {!!showPeek && (