aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video-channel.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-12-08 10:53:41 +0100
committerChocobozzz <chocobozzz@cpy.re>2020-12-08 11:15:11 +0100
commita59f210ff3a4cc87dd19aeaaf0f43f63a8310791 (patch)
tree82ffcc8f6dcee07ad0776a5d3937f8953a958bf8 /server/models/video/video-channel.ts
parente5024f5181b2e8ec23a58a821671000041b5bf2b (diff)
downloadPeerTube-a59f210ff3a4cc87dd19aeaaf0f43f63a8310791.tar.gz
PeerTube-a59f210ff3a4cc87dd19aeaaf0f43f63a8310791.tar.zst
PeerTube-a59f210ff3a4cc87dd19aeaaf0f43f63a8310791.zip
Refactor a little bit client canonical URL
Diffstat (limited to 'server/models/video/video-channel.ts')
-rw-r--r--server/models/video/video-channel.ts5
1 files changed, 5 insertions, 0 deletions
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 {
18 Table, 18 Table,
19 UpdatedAt 19 UpdatedAt
20} from 'sequelize-typescript' 20} from 'sequelize-typescript'
21import { MAccountActor } from '@server/types/models'
21import { ActivityPubActor } from '../../../shared/models/activitypub' 22import { ActivityPubActor } from '../../../shared/models/activitypub'
22import { VideoChannel, VideoChannelSummary } from '../../../shared/models/videos' 23import { VideoChannel, VideoChannelSummary } from '../../../shared/models/videos'
23import { 24import {
@@ -628,6 +629,10 @@ export class VideoChannelModel extends Model<VideoChannelModel> {
628 }) 629 })
629 } 630 }
630 631
632 getLocalUrl (this: MAccountActor | MChannelActor) {
633 return WEBSERVER.URL + `/video-channels/` + this.Actor.preferredUsername
634 }
635
631 getDisplayName () { 636 getDisplayName () {
632 return this.name 637 return this.name
633 } 638 }