Run prettier

This commit is contained in:
dangered wolf 2024-01-02 19:48:14 -05:00
parent b841fc6013
commit 00e5243305
No known key found for this signature in database
GPG key ID: 41E4D37680ED8B58
3 changed files with 11 additions and 6 deletions

View file

@ -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)}`
: ''
}
)
);

View file

@ -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) {