about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/selectors/index.js
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-06-18 18:23:08 +0200
committermultiple creatures <dev@multiple-creature.party>2020-02-22 01:35:01 -0600
commit052ee55210e98bb2e2bae0f05008e7eaeddcb8d1 (patch)
treeb3d61f58505010f1f97c5ba9574d956bf3e0d0c7 /app/javascript/flavours/glitch/selectors/index.js
parent83657becd1f419e776e8e22cad9e54b40e593a45 (diff)
port glitch-soc@`3771a99` to monserfork: [Glitch] Completely hide toots matched by “irreversible” filters even if they got to the client
Diffstat (limited to 'app/javascript/flavours/glitch/selectors/index.js')
-rw-r--r--app/javascript/flavours/glitch/selectors/index.js7
1 files changed, 7 insertions, 0 deletions
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) {