Skip to content

Commit

Permalink
feat: check display name
Browse files Browse the repository at this point in the history
  • Loading branch information
Benricheson101 authored Nov 27, 2023
1 parent aa574d0 commit 9dce80a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion services/bot/lib/services/abusiveUserChecker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ export class AbusiveUserChecker {
'system',
'team',
'terms',
'checkbio',
'seebio',
'byio',
];

return keywords.some(w => normalized.includes(w));
Expand All @@ -74,7 +77,8 @@ export class AbusiveUserChecker {
m =>
!m.user.bot &&
!m.user.avatar?.startsWith('a_') &&
this.checkUsername(m.user.username)
(this.checkUsername(m.user.username) ||
(m.user.global_name && this.checkUsername(m.user.global_name)))
);

const fromRedis = await this.client.state.abusiveUser.getMany(
Expand Down

0 comments on commit 9dce80a

Please sign in to comment.