Prefer canonical alias in `rel=canonical` link

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:
Eric Eastwood 2023-06-22 02:12:19 -05:00
parent 79df21b0f6
commit 503170e76c
1 changed files with 1 additions and 1 deletions

View File

@ -918,7 +918,7 @@ router.get(
entryPoint: 'client/js/entry-client-hydrogen.js',
locationUrl: urlJoin(basePath, req.originalUrl),
canonicalUrl: matrixPublicArchiveURLCreator.archiveUrlForDate(
roomIdOrAlias,
roomData.canonicalAlias || roomIdOrAlias,
new Date(toTimestamp),
{
preferredPrecision: precisionFromUrl,