Prefer canonical alias in `rel=canonical` link (#269)
Follow-up to https://github.com/matrix-org/matrix-public-archive/pull/266 Part of https://github.com/matrix-org/matrix-public-archive/issues/251
This commit is contained in:
parent
79df21b0f6
commit
dd27c1054a
|
@ -918,7 +918,7 @@ router.get(
|
||||||
entryPoint: 'client/js/entry-client-hydrogen.js',
|
entryPoint: 'client/js/entry-client-hydrogen.js',
|
||||||
locationUrl: urlJoin(basePath, req.originalUrl),
|
locationUrl: urlJoin(basePath, req.originalUrl),
|
||||||
canonicalUrl: matrixPublicArchiveURLCreator.archiveUrlForDate(
|
canonicalUrl: matrixPublicArchiveURLCreator.archiveUrlForDate(
|
||||||
roomIdOrAlias,
|
roomData.canonicalAlias || roomIdOrAlias,
|
||||||
new Date(toTimestamp),
|
new Date(toTimestamp),
|
||||||
{
|
{
|
||||||
preferredPrecision: precisionFromUrl,
|
preferredPrecision: precisionFromUrl,
|
||||||
|
|
Loading…
Reference in New Issue