summaryrefslogtreecommitdiff
path: root/packages/backend/src/core
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2023-10-16 15:06:00 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2023-10-16 15:06:00 +0900
commit3ebed5aa3e18cb66359c62f1f77443d120aa9f02 (patch)
tree553e2a909740f505481de2f1f0a76338b09f411e /packages/backend/src/core
parentfix test (diff)
downloadmisskey-3ebed5aa3e18cb66359c62f1f77443d120aa9f02.tar.gz
misskey-3ebed5aa3e18cb66359c62f1f77443d120aa9f02.tar.bz2
misskey-3ebed5aa3e18cb66359c62f1f77443d120aa9f02.zip
feat: local-only antenna
Resolve #11869
Diffstat (limited to 'packages/backend/src/core')
-rw-r--r--packages/backend/src/core/AntennaService.ts2
-rw-r--r--packages/backend/src/core/entities/AntennaEntityService.ts1
2 files changed, 3 insertions, 0 deletions
diff --git a/packages/backend/src/core/AntennaService.ts b/packages/backend/src/core/AntennaService.ts
index 60569c44fc..94c8ad0cf1 100644
--- a/packages/backend/src/core/AntennaService.ts
+++ b/packages/backend/src/core/AntennaService.ts
@@ -98,6 +98,8 @@ export class AntennaService implements OnApplicationShutdown {
if (note.visibility === 'specified') return false;
if (note.visibility === 'followers') return false;
+ if (antenna.localOnly && noteUser.host != null) return false;
+
if (!antenna.withReplies && note.replyId != null) return false;
if (antenna.src === 'home') {
diff --git a/packages/backend/src/core/entities/AntennaEntityService.ts b/packages/backend/src/core/entities/AntennaEntityService.ts
index a9e504d374..265a61e8ad 100644
--- a/packages/backend/src/core/entities/AntennaEntityService.ts
+++ b/packages/backend/src/core/entities/AntennaEntityService.ts
@@ -37,6 +37,7 @@ export class AntennaEntityService {
userListId: antenna.userListId,
users: antenna.users,
caseSensitive: antenna.caseSensitive,
+ localOnly: antenna.localOnly,
notify: antenna.notify,
withReplies: antenna.withReplies,
withFile: antenna.withFile,