import { getAbsoluteAPIUrl } from '@app/helpers'
-import { Actor } from '@app/shared/shared-main'
+import { Account, Actor } from '@app/shared/shared-main'
import { Account as AccountInterface, VideoComment as VideoCommentServerModel, VideoCommentAdmin as VideoCommentAdminServerModel } from '@shared/models'
export class VideoComment implements VideoCommentServerModel {
totalRepliesFromVideoAuthor: number
totalReplies: number
by: string
- accountAvatarUrl: string
isLocal: boolean
if (this.account) {
this.by = Actor.CREATE_BY_STRING(this.account.name, this.account.host)
- this.accountAvatarUrl = Actor.GET_ACTOR_AVATAR_URL(this.account)
const absoluteAPIUrl = getAbsoluteAPIUrl()
const thisHost = new URL(absoluteAPIUrl).host
}
by: string
- accountAvatarUrl: string
constructor (hash: VideoCommentAdminServerModel, textHtml: string) {
this.id = hash.id
if (this.account) {
this.by = Actor.CREATE_BY_STRING(this.account.name, this.account.host)
- this.accountAvatarUrl = Actor.GET_ACTOR_AVATAR_URL(this.account)
this.account.localUrl = '/accounts/' + this.by
}