cleanup(backend): refactor UtilityService (MisskeyIO#858)

This commit is contained in:
あわわわとーにゅ 2024-12-28 11:39:48 +09:00 committed by GitHub
parent cb73368c83
commit ff195d4f8d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
31 changed files with 106 additions and 126 deletions

View file

@ -53,7 +53,7 @@ export class DeliverProcessorService {
// ブロックしてたら中断
const meta = await this.metaService.fetch();
if (this.utilityService.isBlockedHost(meta.blockedHosts, this.utilityService.toPuny(host))) {
if (this.utilityService.isItemListedIn(host, meta.blockedHosts)) {
return 'skip (blocked)';
}
@ -67,7 +67,7 @@ export class DeliverProcessorService {
});
this.suspendedHostsCache.set(suspendedHosts);
}
if (suspendedHosts.map(x => x.host).includes(this.utilityService.toPuny(host))) {
if (suspendedHosts.map(x => x.host).includes(this.utilityService.normalizeHost(host))) {
return 'skip (suspended)';
}