From a59f210ff3a4cc87dd19aeaaf0f43f63a8310791 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 8 Dec 2020 10:53:41 +0100 Subject: Refactor a little bit client canonical URL --- server/models/video/video-channel.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'server/models/video/video-channel.ts') diff --git a/server/models/video/video-channel.ts b/server/models/video/video-channel.ts index 202dc513f..0c8aef18f 100644 --- a/server/models/video/video-channel.ts +++ b/server/models/video/video-channel.ts @@ -18,6 +18,7 @@ import { Table, UpdatedAt } from 'sequelize-typescript' +import { MAccountActor } from '@server/types/models' import { ActivityPubActor } from '../../../shared/models/activitypub' import { VideoChannel, VideoChannelSummary } from '../../../shared/models/videos' import { @@ -628,6 +629,10 @@ export class VideoChannelModel extends Model { }) } + getLocalUrl (this: MAccountActor | MChannelActor) { + return WEBSERVER.URL + `/video-channels/` + this.Actor.preferredUsername + } + getDisplayName () { return this.name } -- cgit v1.2.3