mirror of
https://github.com/CompeyDev/fxtwitter-docker.git
synced 2025-04-16 01:43:54 +01:00
Workaround for video tweets with no text
This commit is contained in:
parent
fb120d8e11
commit
4d8ce87ef8
1 changed files with 6 additions and 0 deletions
|
@ -439,6 +439,12 @@ export const handleStatus = async (
|
||||||
Telegram does not use this. */
|
Telegram does not use this. */
|
||||||
let providerEngagementText = getSocialProof(status) ?? Strings.DEFAULT_AUTHOR_TEXT;
|
let providerEngagementText = getSocialProof(status) ?? Strings.DEFAULT_AUTHOR_TEXT;
|
||||||
providerEngagementText = providerEngagementText.replace(/ {4}/g, ' ');
|
providerEngagementText = providerEngagementText.replace(/ {4}/g, ' ');
|
||||||
|
|
||||||
|
/* Workaround to prevent us from accidentally doubling up the engagement text in both provider and author fields */
|
||||||
|
if (status.text.trim().length === 0) {
|
||||||
|
providerEngagementText = Strings.DEFAULT_AUTHOR_TEXT;
|
||||||
|
}
|
||||||
|
|
||||||
headers.push(
|
headers.push(
|
||||||
`<link rel="alternate" href="{base}/owoembed?text={text}&status={status}&author={author}{provider}" type="application/json+oembed" title="{name}">`.format(
|
`<link rel="alternate" href="{base}/owoembed?text={text}&status={status}&author={author}{provider}" type="application/json+oembed" title="{name}">`.format(
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue