From 6aceadc819b99e2d9bed6c6068abda13aa858450 Mon Sep 17 00:00:00 2001 From: Hongbo Wu Date: Wed, 21 Jun 2023 17:46:05 +0800 Subject: [PATCH] fix attachment url --- .../content-handler/src/websites/nitter-handler.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/content-handler/src/websites/nitter-handler.ts b/packages/content-handler/src/websites/nitter-handler.ts index 7ae1be97f..9b4f19517 100644 --- a/packages/content-handler/src/websites/nitter-handler.ts +++ b/packages/content-handler/src/websites/nitter-handler.ts @@ -239,6 +239,10 @@ export class NitterHandler extends ContentHandler { '_400x400' )}` const description = _.escape(tweet.text) + const imageDomain = + domain === 'twitter.com' + ? 'https://pbs.twimg.com' + : 'https://nitter.net/pic' let tweetsContent = '' for (const tweet of tweets) { @@ -253,9 +257,13 @@ export class NitterHandler extends ContentHandler { const includesHtml = tweet.attachments .map( (attachment) => - ` + ` - + ` )