From 02accb5c794e4fa3c83c451d126a4e4cf616b0d0 Mon Sep 17 00:00:00 2001 From: infinite-persistence Date: Wed, 9 Feb 2022 13:42:20 +0800 Subject: [PATCH] Strip timestamp from url when resolving for OG `Lbry.resolve` won't work with timestamps in the url. --- web/src/html.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/web/src/html.js b/web/src/html.js index f2da2efef..3e5850e17 100644 --- a/web/src/html.js +++ b/web/src/html.js @@ -23,7 +23,7 @@ const { } = require('../../ui/util/web'); const { getJsBundleId } = require('../bundle-id.js'); const { lbryProxy: Lbry } = require('../lbry'); -const { parseURI, normalizeClaimUrl } = require('./lbryURI'); +const { buildURI, parseURI, normalizeClaimUrl } = require('./lbryURI'); const fs = require('fs'); const moment = require('moment'); const PAGES = require('../../ui/constants/pages'); @@ -363,7 +363,8 @@ async function getHtml(ctx) { } if (!requestPath.includes('$')) { - const claimUri = normalizeClaimUrl(requestPath.slice(1)); + const parsedUri = parseURI(normalizeClaimUrl(requestPath.slice(1))); + const claimUri = buildURI({ ...parsedUri, startTime: undefined }); const claim = await resolveClaimOrRedirect(ctx, claimUri); const referrerQuery = escapeHtmlProperty(getParameterByName('r', ctx.request.url));