diff --git a/client/src/app/+accounts/accounts.component.html b/client/src/app/+accounts/accounts.component.html index 038e18c4b..1172f7ba7 100644 --- a/client/src/app/+accounts/accounts.component.html +++ b/client/src/app/+accounts/accounts.component.html @@ -7,8 +7,11 @@
{{ account.displayName }}
-
{{ account.nameWithHost }}
- +
{{ account.nameWithHost }} + +
Banned Muted Muted by your instance diff --git a/client/src/app/shared/account/account.model.ts b/client/src/app/shared/account/account.model.ts index c5cd2051c..61f09fc06 100644 --- a/client/src/app/shared/account/account.model.ts +++ b/client/src/app/shared/account/account.model.ts @@ -5,6 +5,7 @@ export class Account extends Actor implements ServerAccount { displayName: string description: string nameWithHost: string + nameWithHostForced: string mutedByUser: boolean mutedByInstance: boolean mutedServerByUser: boolean @@ -19,6 +20,7 @@ export class Account extends Actor implements ServerAccount { this.description = hash.description this.userId = hash.userId this.nameWithHost = Actor.CREATE_BY_STRING(this.name, this.host) + this.nameWithHostForced = Actor.CREATE_BY_STRING(this.name, this.host, true) this.mutedByUser = false this.mutedByInstance = false diff --git a/client/src/app/shared/actor/actor.model.ts b/client/src/app/shared/actor/actor.model.ts index 5a517c975..285f71ce0 100644 --- a/client/src/app/shared/actor/actor.model.ts +++ b/client/src/app/shared/actor/actor.model.ts @@ -23,11 +23,11 @@ export abstract class Actor implements ActorServer { return window.location.origin + '/client/assets/images/default-avatar.png' } - static CREATE_BY_STRING (accountName: string, host: string) { + static CREATE_BY_STRING (accountName: string, host: string, forceHostname = false) { const absoluteAPIUrl = getAbsoluteAPIUrl() const thisHost = new URL(absoluteAPIUrl).host - if (host.trim() === thisHost) return accountName + if (host.trim() === thisHost && !forceHostname) return accountName return accountName + '@' + host }