summaryrefslogtreecommitdiff
path: root/packages/backend/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'packages/backend/src/core')
-rw-r--r--packages/backend/src/core/AntennaService.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/packages/backend/src/core/AntennaService.ts b/packages/backend/src/core/AntennaService.ts
index 4f956a43ed..5168b6576f 100644
--- a/packages/backend/src/core/AntennaService.ts
+++ b/packages/backend/src/core/AntennaService.ts
@@ -131,13 +131,17 @@ export class AntennaService implements OnApplicationShutdown {
const { username, host } = Acct.parse(x);
return this.utilityService.getFullApAccount(username, host).toLowerCase();
});
- if (!accts.includes(this.utilityService.getFullApAccount(noteUser.username, noteUser.host).toLowerCase())) return false;
+ const matchUser = this.utilityService.getFullApAccount(noteUser.username, noteUser.host).toLowerCase();
+ const matchWildcard = this.utilityService.getFullApAccount('*', noteUser.host).toLowerCase();
+ if (!accts.includes(matchUser) && !accts.includes(matchWildcard)) return false;
} else if (antenna.src === 'users_blacklist') {
const accts = antenna.users.map(x => {
const { username, host } = Acct.parse(x);
return this.utilityService.getFullApAccount(username, host).toLowerCase();
});
- if (accts.includes(this.utilityService.getFullApAccount(noteUser.username, noteUser.host).toLowerCase())) return false;
+ const matchUser = this.utilityService.getFullApAccount(noteUser.username, noteUser.host).toLowerCase();
+ const matchWildcard = this.utilityService.getFullApAccount('*', noteUser.host).toLowerCase();
+ if (accts.includes(matchUser) || accts.includes(matchWildcard)) return false;
}
const keywords = antenna.keywords