From 052ee55210e98bb2e2bae0f05008e7eaeddcb8d1 Mon Sep 17 00:00:00 2001 From: ThibG Date: Tue, 18 Jun 2019 18:23:08 +0200 Subject: port glitch-soc@`3771a99` to monserfork: [Glitch] Completely hide toots matched by “irreversible” filters even if they got to the client MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/javascript/flavours/glitch/selectors/index.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'app/javascript/flavours/glitch/selectors/index.js') diff --git a/app/javascript/flavours/glitch/selectors/index.js b/app/javascript/flavours/glitch/selectors/index.js index e785a7d68..5ed1dfc4d 100644 --- a/app/javascript/flavours/glitch/selectors/index.js +++ b/app/javascript/flavours/glitch/selectors/index.js @@ -84,6 +84,13 @@ export const makeGetStatus = () => { return null; } + const dropRegex = (accountReblog || accountBase).get('id') !== me && regexFromFilters(filters.filter(filter => filter.get('irreversible'))); + + if (dropRegex && dropRegex.test(statusBase.get('reblog') ? statusReblog.get('search_index') : statusBase.get('search_index'))) { + return null; + } + + const regex = (accountReblog || accountBase).get('id') !== me && regexFromFilters(filters); let filtered = false; if (statusReblog) { -- cgit