Fix client URLs for channels and accounts
This commit is contained in:
parent
2fde12d7e1
commit
8a22cfd628
|
@ -103,7 +103,7 @@ describe('Test index HTML generation', function () {
|
|||
|
||||
it('Should use the original account URL for the canonical tag', async function () {
|
||||
const accountURLtest = res => {
|
||||
expect(res.text).to.contain(`<link rel="canonical" href="${servers[0].url}/a/root" />`)
|
||||
expect(res.text).to.contain(`<link rel="canonical" href="${servers[0].url}/a/root/video-channels" />`)
|
||||
}
|
||||
|
||||
accountURLtest(await makeHTMLRequest(servers[0].url, '/accounts/root@' + servers[0].host))
|
||||
|
@ -113,7 +113,7 @@ describe('Test index HTML generation', function () {
|
|||
|
||||
it('Should use the original channel URL for the canonical tag', async function () {
|
||||
const channelURLtests = res => {
|
||||
expect(res.text).to.contain(`<link rel="canonical" href="${servers[0].url}/c/root_channel" />`)
|
||||
expect(res.text).to.contain(`<link rel="canonical" href="${servers[0].url}/c/root_channel/videos" />`)
|
||||
}
|
||||
|
||||
channelURLtests(await makeHTMLRequest(servers[0].url, '/video-channels/root_channel@' + servers[0].host))
|
||||
|
|
|
@ -457,7 +457,7 @@ export class AccountModel extends Model<Partial<AttributesOnly<AccountModel>>> {
|
|||
|
||||
// Avoid error when running this method on MAccount... | MChannel...
|
||||
getClientUrl (this: MAccountHost | MChannelHost) {
|
||||
return WEBSERVER.URL + '/a/' + this.Actor.getIdentifier()
|
||||
return WEBSERVER.URL + '/a/' + this.Actor.getIdentifier() + '/video-channels'
|
||||
}
|
||||
|
||||
isBlocked () {
|
||||
|
|
|
@ -841,7 +841,7 @@ export class VideoChannelModel extends Model<Partial<AttributesOnly<VideoChannel
|
|||
|
||||
// Avoid error when running this method on MAccount... | MChannel...
|
||||
getClientUrl (this: MAccountHost | MChannelHost) {
|
||||
return WEBSERVER.URL + '/c/' + this.Actor.getIdentifier()
|
||||
return WEBSERVER.URL + '/c/' + this.Actor.getIdentifier() + '/videos'
|
||||
}
|
||||
|
||||
getDisplayName () {
|
||||
|
|
Loading…
Reference in New Issue