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

@ -311,7 +311,7 @@ export class CustomEmojiService implements OnApplicationShutdown {
: this.utilityService.isSelfHost(src) ? null // 自ホスト指定
: (src || noteUserHost); // 指定されたホスト || ノートなどの所有者のホスト (こっちがリアクションにマッチすることはない)
host = this.utilityService.toPunyNullable(host);
host = host ? this.utilityService.normalizeHost(host) : null;
return host;
}
@ -324,7 +324,7 @@ export class CustomEmojiService implements OnApplicationShutdown {
const name = match[1];
// ホスト正規化
const host = this.utilityService.toPunyNullable(this.normalizeHost(match[2], noteUserHost));
const host = this.normalizeHost(match[2], noteUserHost);
return { name, host };
}