From e721c9e35ae18f99447c633b56f75d2bb392208b Mon Sep 17 00:00:00 2001 From: Bastard Operator Date: Thu, 31 Dec 2020 14:32:12 +0100 Subject: [PATCH] Only filter the federated timeline (direct messages should not be filtered like this) --- src/routes/_api/timelines.js | 2 +- static/fedilove-no-react.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/routes/_api/timelines.js b/src/routes/_api/timelines.js index 9f7e7a10..ec6eaf6d 100644 --- a/src/routes/_api/timelines.js +++ b/src/routes/_api/timelines.js @@ -95,7 +95,7 @@ export async function getTimeline (instanceName, accessToken, timeline, maxId, s items = items.map(item => item.last_status) } - if (timeline === 'direct' || timeline === 'federated') { + if (timeline === 'federated') { items = window.fediloveFunctions.filterItemsForFedilove(items); } diff --git a/static/fedilove-no-react.js b/static/fedilove-no-react.js index 40067a96..308fd696 100644 --- a/static/fedilove-no-react.js +++ b/static/fedilove-no-react.js @@ -130,7 +130,8 @@ var fediloveFunctions = { for (var item of items) { if (item.account === undefined) continue; - if (item.account.display_name.toLowerCase().includes('#fedilove')) { + if (item.account.display_name.toLowerCase().includes('#fedilove') && + item.content.replace(/<[^<>]+>/g, '').toLowerCase().includes('#fedilove')) { newItems.push(item); } }