From bb3694bfed3ac86ed9d4975800d76baf272c9817 Mon Sep 17 00:00:00 2001 From: dakkar Date: Sat, 3 Feb 2024 12:55:46 +0000 Subject: [PATCH] lint --- .../src/queue/processors/ImportNotesProcessorService.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/backend/src/queue/processors/ImportNotesProcessorService.ts b/packages/backend/src/queue/processors/ImportNotesProcessorService.ts index 44c92fabb..5fb68f0a1 100644 --- a/packages/backend/src/queue/processors/ImportNotesProcessorService.ts +++ b/packages/backend/src/queue/processors/ImportNotesProcessorService.ts @@ -131,7 +131,7 @@ export class ImportNotesProcessorService { } @bindThis - private parseTwitterFile(str : string) : null | { tweet: object }[] { + private parseTwitterFile(str : string) : { tweet: object }[] { const jsonStr = str.replace(/^\s*window\.YTD\.tweets\.part0\s*=\s*/, ''); try { @@ -191,7 +191,7 @@ export class ImportNotesProcessorService { const unprocessedTweets = this.parseTwitterFile(await fs.promises.readFile(outputPath + '/data/tweets.js', 'utf-8')); - const tweets = unprocessedTweets.map(e=>e.tweet); + const tweets = unprocessedTweets.map(e => e.tweet); const processedTweets = await this.recreateChain(['id_str'], ['in_reply_to_status_id_str'], tweets, false); this.queueService.createImportTweetsToDbJob(job.data.user, processedTweets, null); } finally { @@ -584,7 +584,7 @@ export class ImportNotesProcessorService { try { const date = new Date(tweet.created_at); - const decodedText = tweet.full_text.replaceAll('>','>').replaceAll('<','<').replaceAll('&','&'); + const decodedText = tweet.full_text.replaceAll('>', '>').replaceAll('<', '<').replaceAll('&', '&'); const textReplaceURLs = tweet.entities.urls && tweet.entities.urls.length > 0 ? await replaceTwitterUrls(decodedText, tweet.entities.urls) : decodedText; const text = tweet.entities.user_mentions && tweet.entities.user_mentions.length > 0 ? await replaceTwitterMentions(textReplaceURLs, tweet.entities.user_mentions) : textReplaceURLs; const files: MiDriveFile[] = [];