From 2e839e61b92421f6b0006c698f90999ed8392a79 Mon Sep 17 00:00:00 2001 From: CaoMeiYouRen <40430746+CaoMeiYouRen@users.noreply.github.com> Date: Tue, 28 May 2024 02:21:12 +0800 Subject: [PATCH] =?UTF-8?q?feat(route):=20twitter=20=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E5=B0=86=E8=AF=9D=E9=A2=98=E6=8F=90?= =?UTF-8?q?=E5=8F=96=E4=B8=BA=20category=20(#15735)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/twitter/utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/routes/twitter/utils.ts b/lib/routes/twitter/utils.ts index 5bd33ae3e1c7b8..bccaa0ee522db0 100644 --- a/lib/routes/twitter/utils.ts +++ b/lib/routes/twitter/utils.ts @@ -361,7 +361,7 @@ const ProcessFeed = (ctx, { data = [] }, params = {}) => { description += item.full_text; description += img; description += quote; - + const category = description.match(/(\s)?(#[^\s<]+)/g)?.map((e) => e?.match(/#([^\s<]+)/)?.[1]); if (readable) { description += `
`; } @@ -385,7 +385,7 @@ const ProcessFeed = (ctx, { data = [] }, params = {}) => { pubDate: parseDate(item.created_at), link, guid: link.replace('x.com', 'twitter.com'), - + category, _extra: (isRetweet && { links: [