mirror of
https://github.com/CompeyDev/fxtwitter-docker.git
synced 2025-04-07 03:20:55 +01:00
Exclude http-equiv=refresh from Telegram responses
This commit is contained in:
parent
6e405d191a
commit
1bd30112db
1 changed files with 5 additions and 2 deletions
|
@ -76,10 +76,13 @@ export const handleStatus = async (
|
||||||
`<meta name="twitter:card" content="${tweet.twitter_card}"/>`,
|
`<meta name="twitter:card" content="${tweet.twitter_card}"/>`,
|
||||||
`<meta name="twitter:site" content="@${tweet.author.screen_name}"/>`,
|
`<meta name="twitter:site" content="@${tweet.author.screen_name}"/>`,
|
||||||
`<meta name="twitter:creator" 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 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}"/>`
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
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) {
|
if (tweet.translation) {
|
||||||
const { translation } = tweet;
|
const { translation } = tweet;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue