From a282e4d8a072cd56db8c393be7715bda420a243d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 28 Feb 2022 10:41:23 +0100 Subject: Continue user mute in ban modal PR --- client/src/app/shared/shared-main/account/actor.model.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'client/src/app/shared/shared-main') diff --git a/client/src/app/shared/shared-main/account/actor.model.ts b/client/src/app/shared/shared-main/account/actor.model.ts index a54f51aa4..bd693860d 100644 --- a/client/src/app/shared/shared-main/account/actor.model.ts +++ b/client/src/app/shared/shared-main/account/actor.model.ts @@ -1,4 +1,4 @@ -import { getAbsoluteAPIUrl } from '@app/helpers' +import { getAbsoluteAPIUrl, getAPIHost } from '@app/helpers' import { Actor as ServerActor, ActorImage } from '@shared/models' export abstract class Actor implements ServerActor { @@ -32,8 +32,7 @@ export abstract class Actor implements ServerActor { } static CREATE_BY_STRING (accountName: string, host: string, forceHostname = false) { - const absoluteAPIUrl = getAbsoluteAPIUrl() - const thisHost = new URL(absoluteAPIUrl).host + const thisHost = getAPIHost() if (host.trim() === thisHost && !forceHostname) return accountName @@ -41,8 +40,7 @@ export abstract class Actor implements ServerActor { } static IS_LOCAL (host: string) { - const absoluteAPIUrl = getAbsoluteAPIUrl() - const thisHost = new URL(absoluteAPIUrl).host + const thisHost = getAPIHost() return host.trim() === thisHost } -- cgit v1.2.3