From a4f99a766bd07851a37dd7ff8fed7acc2a3ef021 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 23 May 2018 11:38:00 +0200 Subject: Add owner in video channel page --- .../src/app/shared/video-channel/video-channel.model.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'client/src/app/shared') diff --git a/client/src/app/shared/video-channel/video-channel.model.ts b/client/src/app/shared/video-channel/video-channel.model.ts index 01381ac30..199c1d3b8 100644 --- a/client/src/app/shared/video-channel/video-channel.model.ts +++ b/client/src/app/shared/video-channel/video-channel.model.ts @@ -1,15 +1,15 @@ import { VideoChannel as ServerVideoChannel } from '../../../../../shared/models/videos/video-channel.model' import { Actor } from '../actor/actor.model' +import { Account } from '../../../../../shared/models/actors' export class VideoChannel extends Actor implements ServerVideoChannel { displayName: string description: string support: string isLocal: boolean - ownerAccount?: { - id: number - uuid: string - } + ownerAccount?: Account + ownerBy?: string + ownerAvatarUrl?: string constructor (hash: ServerVideoChannel) { super(hash) @@ -18,6 +18,11 @@ export class VideoChannel extends Actor implements ServerVideoChannel { this.description = hash.description this.support = hash.support this.isLocal = hash.isLocal - this.ownerAccount = hash.ownerAccount + + if (hash.ownerAccount) { + this.ownerAccount = hash.ownerAccount + this.ownerBy = Actor.CREATE_BY_STRING(hash.ownerAccount.name, hash.ownerAccount.host) + this.ownerAvatarUrl = Actor.GET_ACTOR_AVATAR_URL(this.ownerAccount) + } } } -- cgit v1.2.3