diff --git a/packages/backend/src/core/AntennaService.ts b/packages/backend/src/core/AntennaService.ts index b5e63862fb..0b821b59fc 100644 --- a/packages/backend/src/core/AntennaService.ts +++ b/packages/backend/src/core/AntennaService.ts @@ -172,10 +172,6 @@ export class AntennaService implements OnApplicationShutdown { @Inject(DI.antennasRepository) private antennasRepository: AntennasRepository, - @Inject(DI.userListMembershipsRepository) - private userListMembershipsRepository: UserListMembershipsRepository, - - private cacheService: CacheService, private roleService: RoleService, private utilityService: UtilityService, private globalEventService: GlobalEventService, @@ -245,6 +241,7 @@ export class AntennaService implements OnApplicationShutdown { caseSensitive: boolean; localOnly?: boolean; excludeBots?: boolean; + excludeNotesInSensitiveChannel?: boolean; useRegex?: boolean; withReplies: boolean; withFile: boolean; @@ -272,6 +269,7 @@ export class AntennaService implements OnApplicationShutdown { caseSensitive: ps.caseSensitive, localOnly: ps.localOnly, excludeBots: ps.excludeBots, + excludeNotesInSensitiveChannel: ps.excludeNotesInSensitiveChannel, useRegex: ps.useRegex, withReplies: ps.withReplies, withFile: ps.withFile, @@ -294,6 +292,7 @@ export class AntennaService implements OnApplicationShutdown { caseSensitive?: boolean; localOnly?: boolean; excludeBots?: boolean; + excludeNotesInSensitiveChannel?: boolean; useRegex?: boolean; withReplies?: boolean; withFile?: boolean; @@ -328,6 +327,7 @@ export class AntennaService implements OnApplicationShutdown { caseSensitive: ps.caseSensitive, localOnly: ps.localOnly, excludeBots: ps.excludeBots, + excludeNotesInSensitiveChannel: ps.excludeNotesInSensitiveChannel, useRegex: ps.useRegex, withReplies: ps.withReplies, withFile: ps.withFile, @@ -402,11 +402,11 @@ export class AntennaService implements OnApplicationShutdown { } @bindThis - public async checkHitAntenna( + public checkHitAntenna( filter: AntennaFilter, note: (MiNote | Packed<'Note'>), noteUser: { id: MiUser['id']; username: string; host: string | null; isBot: boolean; }, - ): Promise { + ): boolean { const antenna = filter.src; if (antenna.excludeNotesInSensitiveChannel && note.channel?.isSensitive) return false; if (antenna.excludeBots && noteUser.isBot) return false;