From 24734d408700a72d45c3ff4a679606cab3ec544f Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Mon, 2 Mar 2026 16:05:12 -0500 Subject: split url into webUrl and localUrl (like mastodon) --- packages/backend/src/core/entities/UserEntityService.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'packages/backend/src/core/entities/UserEntityService.ts') diff --git a/packages/backend/src/core/entities/UserEntityService.ts b/packages/backend/src/core/entities/UserEntityService.ts index 638eaac16f..c88632b856 100644 --- a/packages/backend/src/core/entities/UserEntityService.ts +++ b/packages/backend/src/core/entities/UserEntityService.ts @@ -400,10 +400,10 @@ export class UserEntityService implements OnModuleInit { @bindThis public getIdenticonUrl(user: MiUser): string { - if ((user.host == null || user.host === this.config.host) && user.username.includes('.') && this.meta.iconUrl) { // ローカルのシステムアカウントの場合 + if ((user.host == null || user.host === this.config.localHost) && user.username.includes('.') && this.meta.iconUrl) { // ローカルのシステムアカウントの場合 return this.meta.iconUrl; } else { - return `${this.config.url}/identicon/${user.username.toLowerCase()}@${user.host ?? this.config.host}`; + return `${this.config.webUrl}/identicon/${user.username.toLowerCase()}@${user.host ?? this.config.localHost}`; } } @@ -415,7 +415,7 @@ export class UserEntityService implements OnModuleInit { @bindThis public genLocalUserUri(userId: string): string { - return `${this.config.url}/users/${userId}`; + return `${this.config.webUrl}/users/${userId}`; } public async pack( @@ -531,7 +531,7 @@ export class UserEntityService implements OnModuleInit { ...announcement, })) : null; - const checkHost = user.host == null ? this.config.host : user.host; + const checkHost = user.host == null ? this.config.localHost : user.host; const notificationsInfo = isMe && isDetailed ? await this.getNotificationsInfo(user.id) : null; let fetchPoliciesPromise: Promise | null = null; -- cgit v1.2.3-freya