followup merge
This commit is contained in:
parent
4c40d0a809
commit
d681dc42e8
|
@ -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> {
|
||||
): boolean {
|
||||
const antenna = filter.src;
|
||||
if (antenna.excludeNotesInSensitiveChannel && note.channel?.isSensitive) return false;
|
||||
if (antenna.excludeBots && noteUser.isBot) return false;
|
||||
|
|
Loading…
Reference in New Issue