Skip to content

Commit

Permalink
fix(previewFix): tweet preview not getting suppress
Browse files Browse the repository at this point in the history
  • Loading branch information
bluenk committed Feb 6, 2024
1 parent bed55d2 commit 5e4cc92
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/handlers/PreviewFix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,13 @@ export default class PreviewFix extends Handler {

const needFix = [
...twitterUrls
.filter(url => !msg.embeds.find((v) => v.url === url.href))
.filter(url => Boolean(url.pathname.split('/')[1])),
.filter(url => Boolean(url.pathname.split('/')[1]))
.filter(
url =>
SUPPRESS_PREVIEW
? true
: !msg.embeds.find((v) => v.url === url.href)
),
...lineTodayUrls,
...BAHAUrls
];
Expand Down

0 comments on commit 5e4cc92

Please sign in to comment.