about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/actions
diff options
context:
space:
mode:
authorReverite <github@reverite.sh>2019-06-22 14:15:02 -0600
committerReverite <github@reverite.sh>2019-06-22 14:15:02 -0600
commit714940de498e93a8bf40dcda1835217df18741bf (patch)
treeeafc1d01710ba978f133216d8d1a6e4d585606c6 /app/javascript/flavours/glitch/actions
parentb2ffaa9f2909c83f23691a02b2843bf41a1a12c0 (diff)
parent38d28824475056766c97385b66f4e04a5123e3a2 (diff)
Merge branch 'glitch' into production
Diffstat (limited to 'app/javascript/flavours/glitch/actions')
-rw-r--r--app/javascript/flavours/glitch/actions/notifications.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/actions/notifications.js b/app/javascript/flavours/glitch/actions/notifications.js
index 57fecf63d..2107503db 100644
--- a/app/javascript/flavours/glitch/actions/notifications.js
+++ b/app/javascript/flavours/glitch/actions/notifications.js
@@ -62,9 +62,14 @@ export function updateNotifications(notification, intlMessages, intlLocale) {
     let filtered = false;
 
     if (notification.type === 'mention') {
+      const dropRegex   = regexFromFilters(filters.filter(filter => filter.get('irreversible')));
       const regex       = regexFromFilters(filters);
       const searchIndex = notification.status.spoiler_text + '\n' + unescapeHTML(notification.status.content);
 
+      if (dropRegex && dropRegex.test(searchIndex)) {
+        return;
+      }
+
       filtered = regex && regex.test(searchIndex);
     }