- const name = video ? video.name : CONFIG.INSTANCE.NAME
- const description = video ? video.description : CONFIG.INSTANCE.DESCRIPTION
- const feed = initFeed(name, description)
+ let name: string
+ let description: string
+
+ if (videoChannel) {
+ name = videoChannel.getDisplayName()
+ description = videoChannel.description
+ } else if (account) {
+ name = account.getDisplayName()
+ description = account.description
+ } else {
+ name = video ? video.name : CONFIG.INSTANCE.NAME
+ description = video ? video.description : CONFIG.INSTANCE.DESCRIPTION
+ }
+ const feed = initFeed({
+ name,
+ description,
+ resourceType: 'video-comments',
+ queryString: new URL(WEBSERVER.URL + req.originalUrl).search
+ })