diff options
Diffstat (limited to 'client/src/app/shared/video/video.model.ts')
-rw-r--r-- | client/src/app/shared/video/video.model.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/client/src/app/shared/video/video.model.ts b/client/src/app/shared/video/video.model.ts index 060bf933f..a4b90ad94 100644 --- a/client/src/app/shared/video/video.model.ts +++ b/client/src/app/shared/video/video.model.ts | |||
@@ -35,7 +35,10 @@ export class Video implements VideoServerModel { | |||
35 | nsfw: boolean | 35 | nsfw: boolean |
36 | account: Account | 36 | account: Account |
37 | 37 | ||
38 | private static createByString (account: string, serverHost: string) { | 38 | private static createByString (account: string, serverHost: string, apiURL: string) { |
39 | const thisHost = new URL(apiURL).host | ||
40 | if (serverHost.trim() === thisHost) | ||
41 | return account | ||
39 | return account + '@' + serverHost | 42 | return account + '@' + serverHost |
40 | } | 43 | } |
41 | 44 | ||
@@ -78,7 +81,7 @@ export class Video implements VideoServerModel { | |||
78 | this.dislikes = hash.dislikes | 81 | this.dislikes = hash.dislikes |
79 | this.nsfw = hash.nsfw | 82 | this.nsfw = hash.nsfw |
80 | 83 | ||
81 | this.by = Video.createByString(hash.accountName, hash.serverHost) | 84 | this.by = Video.createByString(hash.accountName, hash.serverHost, absoluteAPIUrl) |
82 | } | 85 | } |
83 | 86 | ||
84 | isVideoNSFWForUser (user: User) { | 87 | isVideoNSFWForUser (user: User) { |