Only filter the federated timeline

(direct messages should not be filtered like this)
This commit is contained in:
Bofh 2020-12-31 14:32:12 +01:00
parent 229908e0f3
commit e721c9e35a
2 changed files with 3 additions and 2 deletions

View File

@ -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);
}

View File

@ -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);
}
}