about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/actions/notifications.js
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-07-01 19:30:46 +0200
committerGitHub <noreply@github.com>2019-07-01 19:30:46 +0200
commit687680f241f0244ad6998b7c76f0a96c22498b8a (patch)
tree6db10a52f9c6522517897f804c808a950308549d /app/javascript/flavours/glitch/actions/notifications.js
parent98c2d2aa46c2725b360907cf5537338ac6d052ed (diff)
parentb6e9b7d1cdaf762964b0920cfb0485d30cff834c (diff)
Merge pull request #1148 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/javascript/flavours/glitch/actions/notifications.js')
-rw-r--r--app/javascript/flavours/glitch/actions/notifications.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/javascript/flavours/glitch/actions/notifications.js b/app/javascript/flavours/glitch/actions/notifications.js
index 2107503db..c057a5298 100644
--- a/app/javascript/flavours/glitch/actions/notifications.js
+++ b/app/javascript/flavours/glitch/actions/notifications.js
@@ -11,7 +11,7 @@ import { saveSettings } from './settings';
 import { defineMessages } from 'react-intl';
 import { List as ImmutableList } from 'immutable';
 import { unescapeHTML } from 'flavours/glitch/util/html';
-import { getFilters, regexFromFilters } from 'flavours/glitch/selectors';
+import { getFiltersRegex } from 'flavours/glitch/selectors';
 
 export const NOTIFICATIONS_UPDATE = 'NOTIFICATIONS_UPDATE';
 
@@ -57,13 +57,13 @@ export function updateNotifications(notification, intlMessages, intlLocale) {
     const showInColumn = getState().getIn(['settings', 'notifications', 'shows', notification.type], true);
     const showAlert    = getState().getIn(['settings', 'notifications', 'alerts', notification.type], true);
     const playSound    = getState().getIn(['settings', 'notifications', 'sounds', notification.type], true);
-    const filters      = getFilters(getState(), { contextType: 'notifications' });
+    const filters      = getFiltersRegex(getState(), { contextType: 'notifications' });
 
     let filtered = false;
 
     if (notification.type === 'mention') {
-      const dropRegex   = regexFromFilters(filters.filter(filter => filter.get('irreversible')));
-      const regex       = regexFromFilters(filters);
+      const dropRegex   = filters[0];
+      const regex       = filters[1];
       const searchIndex = notification.status.spoiler_text + '\n' + unescapeHTML(notification.status.content);
 
       if (dropRegex && dropRegex.test(searchIndex)) {