Exclude http-equiv=refresh from Telegram responses

This commit is contained in:
dangered wolf 2022-08-10 00:21:28 -04:00
parent 6e405d191a
commit 1bd30112db
No known key found for this signature in database
GPG key ID: 41E4D37680ED8B58

View file

@ -76,10 +76,13 @@ export const handleStatus = async (
`<meta name="twitter:card" content="${tweet.twitter_card}"/>`,
`<meta name="twitter:site" content="@${tweet.author.screen_name}"/>`,
`<meta name="twitter:creator" content="@${tweet.author.screen_name}"/>`,
`<meta name="twitter:title" content="${tweet.author.name} (@${tweet.author.screen_name})"/>`,
`<meta http-equiv="refresh" content="0;url=https://twitter.com/${tweet.author.screen_name}/status/${tweet.id}"/>`
`<meta name="twitter:title" content="${tweet.author.name} (@${tweet.author.screen_name})"/>`
];
if (userAgent?.indexOf('Telegram') === -1) {
headers.push(`<meta http-equiv="refresh" content="0;url=https://twitter.com/${tweet.author.screen_name}/status/${tweet.id}"/>`)
}
if (tweet.translation) {
const { translation } = tweet;