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:
Eric Eastwood 2023-06-22 02:23:48 -05:00 committed by GitHub
parent 79df21b0f6
commit dd27c1054a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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,