diff options
author | Chocobozzz <me@florianbigard.com> | 2022-02-28 10:41:23 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2022-02-28 11:36:31 +0100 |
commit | a282e4d8a072cd56db8c393be7715bda420a243d (patch) | |
tree | a49f4951b7e780c0f731d574cb187da009b311b8 /client/src/app/shared/shared-main | |
parent | 5a8de57d574045c5f819b8c81fb0530a9e9a699f (diff) | |
download | PeerTube-a282e4d8a072cd56db8c393be7715bda420a243d.tar.gz PeerTube-a282e4d8a072cd56db8c393be7715bda420a243d.tar.zst PeerTube-a282e4d8a072cd56db8c393be7715bda420a243d.zip |
Continue user mute in ban modal PR
Diffstat (limited to 'client/src/app/shared/shared-main')
-rw-r--r-- | client/src/app/shared/shared-main/account/actor.model.ts | 8 |
1 files changed, 3 insertions, 5 deletions
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 @@ | |||
1 | import { getAbsoluteAPIUrl } from '@app/helpers' | 1 | import { getAbsoluteAPIUrl, getAPIHost } from '@app/helpers' |
2 | import { Actor as ServerActor, ActorImage } from '@shared/models' | 2 | import { Actor as ServerActor, ActorImage } from '@shared/models' |
3 | 3 | ||
4 | export abstract class Actor implements ServerActor { | 4 | export abstract class Actor implements ServerActor { |
@@ -32,8 +32,7 @@ export abstract class Actor implements ServerActor { | |||
32 | } | 32 | } |
33 | 33 | ||
34 | static CREATE_BY_STRING (accountName: string, host: string, forceHostname = false) { | 34 | static CREATE_BY_STRING (accountName: string, host: string, forceHostname = false) { |
35 | const absoluteAPIUrl = getAbsoluteAPIUrl() | 35 | const thisHost = getAPIHost() |
36 | const thisHost = new URL(absoluteAPIUrl).host | ||
37 | 36 | ||
38 | if (host.trim() === thisHost && !forceHostname) return accountName | 37 | if (host.trim() === thisHost && !forceHostname) return accountName |
39 | 38 | ||
@@ -41,8 +40,7 @@ export abstract class Actor implements ServerActor { | |||
41 | } | 40 | } |
42 | 41 | ||
43 | static IS_LOCAL (host: string) { | 42 | static IS_LOCAL (host: string) { |
44 | const absoluteAPIUrl = getAbsoluteAPIUrl() | 43 | const thisHost = getAPIHost() |
45 | const thisHost = new URL(absoluteAPIUrl).host | ||
46 | 44 | ||
47 | return host.trim() === thisHost | 45 | return host.trim() === thisHost |
48 | } | 46 | } |