From c7646af801eec5a143c2e288527fce235ec52c0d Mon Sep 17 00:00:00 2001 From: ecency Date: Mon, 13 Jul 2026 13:32:52 +0000 Subject: [PATCH] Show a thumbnail on payout notifications payouts carries img_url (the post that paid out) and the api has always sent it, but the type was missing from the image mapper. It is live and not rare: roughly 1,500 rows a day, about half of them with an image. It was missed because the sdk has no ApiPayoutNotification type at all, so the type list was derived from an incomplete source. --- src/utils/notificationImage.test.ts | 2 +- src/utils/notificationImage.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/notificationImage.test.ts b/src/utils/notificationImage.test.ts index 3a5b765d72..499f7b1500 100644 --- a/src/utils/notificationImage.test.ts +++ b/src/utils/notificationImage.test.ts @@ -17,7 +17,7 @@ describe('getNotificationImageUrl', () => { expect(url).toBe(`proxy(96x96):${IMG}`); }); - it.each(['mention', 'reblog', 'scheduled_published', 'favorites'])( + it.each(['mention', 'reblog', 'scheduled_published', 'favorites', 'payouts'])( 'uses img_url for a %s', (type) => { expect(getNotificationImageUrl({ type, img_url: IMG })).toBe(`proxy(96x96):${IMG}`); diff --git a/src/utils/notificationImage.ts b/src/utils/notificationImage.ts index 4bc7c91bbe..b5f6064b6d 100644 --- a/src/utils/notificationImage.ts +++ b/src/utils/notificationImage.ts @@ -9,7 +9,7 @@ const THUMB_SIZE = 96; // Vote notifications also carry img_url, but they are by far the highest-volume // type and every thumbnail would be a repeat of the user's own post, so they are // deliberately left text-only. -const IMAGE_TYPES = ['mention', 'reblog', 'scheduled_published', 'favorites']; +const IMAGE_TYPES = ['mention', 'reblog', 'scheduled_published', 'favorites', 'payouts']; // Types whose image hangs off the PARENT post, because the notification itself is // about a comment: your post that was replied to, or the post you bookmarked that