diff --git a/app/soapbox/features/filters/index.tsx b/app/soapbox/features/filters/index.tsx index 46eba410b..5aadf1795 100644 --- a/app/soapbox/features/filters/index.tsx +++ b/app/soapbox/features/filters/index.tsx @@ -70,8 +70,8 @@ const Filters = () => { emptyMessage={emptyMessage} itemClassName='pb-4 last:pb-0' > - {filters.map((filter, i) => ( -
+ {filters.map((filter) => ( +
diff --git a/app/soapbox/selectors/index.ts b/app/soapbox/selectors/index.ts index 4679c1148..a936ffdf1 100644 --- a/app/soapbox/selectors/index.ts +++ b/app/soapbox/selectors/index.ts @@ -159,23 +159,6 @@ const checkFiltered = (index: string, filters: ImmutableList) => if (regex.test(index)) return result.concat(filter.title); return result; }, ImmutableList())), ImmutableList()); -// const results = -// let expr = escapeRegExp(filter.phrase); - -// if (filter.whole_word) { -// if (/^[\w]/.test(expr)) { -// expr = `\\b${expr}`; -// } - -// if (/[\w]$/.test(expr)) { -// expr = `${expr}\\b`; -// } -// } - -// const regex = new RegExp(expr); - -// if (regex.test(index)) return result.join(filter.phrase); -// return result; type APIStatus = { id: string, username?: string }; @@ -216,7 +199,7 @@ export const makeGetStatus = () => { // @ts-ignore map.set('group', group || null); - if ((features.filters || features.filtersV2) && (accountReblog || accountBase).id !== me) { + if ((features.filters) && (accountReblog || accountBase).id !== me) { const filtered = checkFiltered(statusReblog?.search_index || statusBase.search_index, filters); map.set('filtered', filtered);