aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/video/video.model.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/video/video.model.ts')
-rw-r--r--client/src/app/shared/video/video.model.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/client/src/app/shared/video/video.model.ts b/client/src/app/shared/video/video.model.ts
index 2e85f40ef..f56eecaeb 100644
--- a/client/src/app/shared/video/video.model.ts
+++ b/client/src/app/shared/video/video.model.ts
@@ -1,13 +1,14 @@
1import { Account } from '@app/shared/account/account.model'
2import { User } from '../' 1import { User } from '../'
3import { Video as VideoServerModel, VideoPrivacy } from '../../../../../shared' 2import { Video as VideoServerModel, VideoPrivacy } from '../../../../../shared'
4import { Avatar } from '../../../../../shared/models/avatars/avatar.model' 3import { Avatar } from '../../../../../shared/models/avatars/avatar.model'
5import { VideoConstant } from '../../../../../shared/models/videos/video.model' 4import { VideoConstant } from '../../../../../shared/models/videos/video.model'
6import { getAbsoluteAPIUrl } from '../misc/utils' 5import { getAbsoluteAPIUrl } from '../misc/utils'
7import { ServerConfig } from '../../../../../shared/models' 6import { ServerConfig } from '../../../../../shared/models'
7import { Actor } from '@app/shared/actor/actor.model'
8 8
9export class Video implements VideoServerModel { 9export class Video implements VideoServerModel {
10 by: string 10 by: string
11 accountAvatarUrl: string
11 createdAt: Date 12 createdAt: Date
12 updatedAt: Date 13 updatedAt: Date
13 publishedAt: Date 14 publishedAt: Date
@@ -85,7 +86,8 @@ export class Video implements VideoServerModel {
85 this.nsfw = hash.nsfw 86 this.nsfw = hash.nsfw
86 this.account = hash.account 87 this.account = hash.account
87 88
88 this.by = Account.CREATE_BY_STRING(hash.account.name, hash.account.host) 89 this.by = Actor.CREATE_BY_STRING(hash.account.name, hash.account.host)
90 this.accountAvatarUrl = Actor.GET_ACTOR_AVATAR_URL(this.account)
89 } 91 }
90 92
91 isVideoNSFWForUser (user: User, serverConfig: ServerConfig) { 93 isVideoNSFWForUser (user: User, serverConfig: ServerConfig) {