X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fvideos%2F%2Bvideo-watch%2Fcomment%2Fvideo-comment.model.ts;h=8fa02aee18e4ea0e3f28288a588ecc4841c448d2;hb=244e76a552ef05a5067134b1065d26dd89246d8c;hp=df7d5244c4534fe219e8b4395cbb195f8bf37f88;hpb=4635f59d7c3fea4b97029f10886c62fdf38b2084;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/videos/+video-watch/comment/video-comment.model.ts b/client/src/app/videos/+video-watch/comment/video-comment.model.ts index df7d5244c..8fa02aee1 100644 --- a/client/src/app/videos/+video-watch/comment/video-comment.model.ts +++ b/client/src/app/videos/+video-watch/comment/video-comment.model.ts @@ -1,3 +1,5 @@ +import { Account } from '@app/shared/account/account.model' +import { Account as AccountInterface } from '../../../../../../shared/models/actors' import { VideoComment as VideoCommentServerModel } from '../../../../../../shared/models/videos/video-comment.model' export class VideoComment implements VideoCommentServerModel { @@ -9,18 +11,10 @@ export class VideoComment implements VideoCommentServerModel { videoId: number createdAt: Date | string updatedAt: Date | string - account: { - name: string - host: string - } + account: AccountInterface totalReplies: number - by: string - private static createByString (account: string, serverHost: string) { - return account + '@' + serverHost - } - constructor (hash: VideoCommentServerModel) { this.id = hash.id this.url = hash.url @@ -33,6 +27,6 @@ export class VideoComment implements VideoCommentServerModel { this.account = hash.account this.totalReplies = hash.totalReplies - this.by = VideoComment.createByString(this.account.name, this.account.host) + this.by = Account.CREATE_BY_STRING(this.account.name, this.account.host) } }