diff options
author | ThibG <thib@sitedethib.com> | 2019-06-18 18:23:08 +0200 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2019-06-19 19:16:13 +0200 |
commit | 3771a993b7e19bc0e756e7f727f10ddd14c10c93 (patch) | |
tree | e512bfc11eae35fa601522672f47261a0972c484 /app/javascript/flavours/glitch/selectors | |
parent | 032a6696227edc8f55d07d0243c10e11d6ac18da (diff) |
[Glitch] Completely hide toots matched by “irreversible” filters even if they got to the client
Diffstat (limited to 'app/javascript/flavours/glitch/selectors')
-rw-r--r-- | app/javascript/flavours/glitch/selectors/index.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/selectors/index.js b/app/javascript/flavours/glitch/selectors/index.js index d1a88a2fc..2d4f3f7b4 100644 --- a/app/javascript/flavours/glitch/selectors/index.js +++ b/app/javascript/flavours/glitch/selectors/index.js @@ -78,6 +78,12 @@ 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; |