From 2782f1ea1f1020525e2745d291a2c31a94ebc958 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8A=E3=81=95=E3=82=80=E3=81=AE=E3=81=B2=E3=81=A8?= <46447427+samunohito@users.noreply.github.com> Date: Mon, 13 Jan 2025 14:52:38 +0900 Subject: [PATCH] =?UTF-8?q?=E4=BD=8E=E3=82=B3=E3=82=B9=E3=83=88=E3=81=AA?= =?UTF-8?q?=E5=88=A4=E5=AE=9A=E6=96=87=E3=82=92=E5=89=8D=E3=81=AB=E3=82=82?= =?UTF-8?q?=E3=81=A3=E3=81=A6=E3=81=8D=E3=81=A6=E9=87=8D=E3=81=84=E5=88=A4?= =?UTF-8?q?=E5=AE=9A=E6=96=87=E3=81=AB=E5=85=A5=E3=82=8B=E5=8F=AF=E8=83=BD?= =?UTF-8?q?=E6=80=A7=E3=82=92=E5=B0=91=E3=81=97=E3=81=A7=E3=82=82=E4=B8=8B?= =?UTF-8?q?=E3=81=92=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/backend/src/core/AntennaService.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/backend/src/core/AntennaService.ts b/packages/backend/src/core/AntennaService.ts index 7e67419b44..0290418fdd 100644 --- a/packages/backend/src/core/AntennaService.ts +++ b/packages/backend/src/core/AntennaService.ts @@ -119,23 +119,24 @@ export class AntennaService implements OnApplicationShutdown { host: string | null; isBot: boolean; }): Promise { + if (antenna.excludeBots && noteUser.isBot) return false; + + if (antenna.localOnly && noteUser.host != null) return false; + + if (!antenna.withReplies && note.replyId != null) return false; + if (note.visibility === 'specified') { if (note.userId !== antenna.userId) { if (note.visibleUserIds == null) return false; if (!note.visibleUserIds.includes(antenna.userId)) return false; } } + if (note.visibility === 'followers') { const isFollowing = Object.hasOwn(await this.cacheService.userFollowingsCache.fetch(antenna.userId), note.userId); if (!isFollowing && antenna.userId !== note.userId) return false; } - if (antenna.excludeBots && noteUser.isBot) return false; - - if (antenna.localOnly && noteUser.host != null) return false; - - if (!antenna.withReplies && note.replyId != null) return false; - if (antenna.src === 'home') { // TODO } else if (antenna.src === 'list') {