From e99ae2a9f39818657478d9bdcc707adca29aeb0c Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Sat, 28 Dec 2024 17:53:28 +0900 Subject: [PATCH] fix --- .../server/api/stream/channels/user-list.ts | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/packages/backend/src/server/api/stream/channels/user-list.ts b/packages/backend/src/server/api/stream/channels/user-list.ts index 18cfed5d6b..1e2f3d6f43 100644 --- a/packages/backend/src/server/api/stream/channels/user-list.ts +++ b/packages/backend/src/server/api/stream/channels/user-list.ts @@ -120,13 +120,21 @@ class UserListChannel extends Channel { } } - if (this.minimize && ['public', 'home'].includes(note.visibility)) { - this.send('note', { - id: note.id, myReaction: note.myReaction, - poll: note.poll?.choices ? { choices: note.poll.choices } : undefined, - reply: note.reply?.myReaction ? { myReaction: note.reply.myReaction } : undefined, - renote: note.renote?.myReaction ? { myReaction: note.renote.myReaction } : undefined, - }); + if (this.minimize) { + if (this.noteEntityService.canCache(note)) { + this.send('note', { + id: note.id, myReaction: note.myReaction, + poll: note.poll?.choices ? { choices: note.poll.choices } : undefined, + reply: note.reply?.myReaction ? { myReaction: note.reply.myReaction } : undefined, + renote: note.renote?.myReaction ? { myReaction: note.renote.myReaction } : undefined, + _allowCached_: true, + }); + } else { + this.send('note', { + id: note.id, + _allowCached_: false, + }); + } } else { this.connection.cacheNote(note); this.send('note', note);