Backport fix for #474 from PR

This commit is contained in:
dangered wolf 2023-11-10 01:09:45 -05:00
parent 675b4a14ab
commit 004d8b7b03
No known key found for this signature in database
GPG key ID: 41E4D37680ED8B58

View file

@ -414,7 +414,7 @@ export const handleStatus = async (
`<link rel="alternate" href="{base}/owoembed?text={text}{deprecatedFlag}&status={status}&author={author}" type="application/json+oembed" title="{name}">`.format( `<link rel="alternate" href="{base}/owoembed?text={text}{deprecatedFlag}&status={status}&author={author}" type="application/json+oembed" title="{name}">`.format(
{ {
base: Constants.HOST_URL, base: Constants.HOST_URL,
text: encodeURIComponent(truncateWithEllipsis(authorText, 256)), text: encodeURIComponent(truncateWithEllipsis(authorText, 255)),
deprecatedFlag: flags?.deprecated ? '&deprecated=true' : '', deprecatedFlag: flags?.deprecated ? '&deprecated=true' : '',
status: encodeURIComponent(status), status: encodeURIComponent(status),
author: encodeURIComponent(tweet.author?.screen_name || ''), author: encodeURIComponent(tweet.author?.screen_name || ''),