mirror of
https://github.com/CompeyDev/fxtwitter-docker.git
synced 2025-04-05 10:30:55 +01:00
Run prettier
This commit is contained in:
parent
b841fc6013
commit
00e5243305
3 changed files with 11 additions and 6 deletions
|
@ -124,7 +124,7 @@ On a different note, if the person who posted a FxTwitter link forgot to strip t
|
|||
|
||||
In many ways, FxTwitter has richer embeds and does more. Here's a table comparing some of FxTwitter's features compared to Twitter default embeds as well as other embedding services
|
||||
|
||||
| | FxTwitter | Twitter default | vxTwitter (BetterTwitFix) |
|
||||
| | FxTwitter | Twitter default | vxTwitter (BetterTwitFix) |
|
||||
| -------------------------------------- | :------------------------------------------------: | :------------------------------: | :-------------------------------------------------: |
|
||||
| Embed Posts / Images | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
|
||||
| Embed profile pictures on text posts | :heavy_check_mark: | :x: | :heavy_check_mark: |
|
||||
|
|
|
@ -311,7 +311,7 @@ export const handleStatus = async (
|
|||
);
|
||||
headers.push(...instructions.addHeaders);
|
||||
}
|
||||
if (status.media?.external && !(status.media.videos?.length)) {
|
||||
if (status.media?.external && !status.media.videos?.length) {
|
||||
const { external } = status.media;
|
||||
authorText = newText || '';
|
||||
headers.push(
|
||||
|
@ -330,8 +330,6 @@ export const handleStatus = async (
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* This status contains a poll, so we'll render it */
|
||||
if (status.poll) {
|
||||
const { poll } = status;
|
||||
|
@ -455,7 +453,10 @@ export const handleStatus = async (
|
|||
status: encodeURIComponent(statusId),
|
||||
author: encodeURIComponent(status.author.screen_name || ''),
|
||||
name: status.author.name || '',
|
||||
provider: (status.embed_card === 'player' && providerEngagementText !== Strings.DEFAULT_AUTHOR_TEXT) ? `&provider=${encodeURIComponent(providerEngagementText)}` : ''
|
||||
provider:
|
||||
status.embed_card === 'player' && providerEngagementText !== Strings.DEFAULT_AUTHOR_TEXT
|
||||
? `&provider=${encodeURIComponent(providerEngagementText)}`
|
||||
: ''
|
||||
}
|
||||
)
|
||||
);
|
||||
|
|
|
@ -261,7 +261,11 @@ export const buildAPITwitterStatus = async (
|
|||
console.log('language?', language);
|
||||
|
||||
/* If a language is specified in API or by user, let's try translating it! */
|
||||
if (typeof language === 'string' && (language.length === 2 || language.length === 5) && language !== status.legacy.lang) {
|
||||
if (
|
||||
typeof language === 'string' &&
|
||||
(language.length === 2 || language.length === 5) &&
|
||||
language !== status.legacy.lang
|
||||
) {
|
||||
console.log(`Attempting to translate status to ${language}...`);
|
||||
const translateAPI = await translateStatus(status, '', language, c);
|
||||
if (translateAPI !== null && translateAPI?.translation) {
|
||||
|
|
Loading…
Add table
Reference in a new issue