about summary refs log tree commit diff
path: root/app/javascript
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-10-15 22:57:38 +0200
committerThibG <thib@sitedethib.com>2019-10-17 11:43:58 +0200
commit069e0520c9ab496c4685a9ff1629858d58269f1d (patch)
tree7e9eb7f9e82e87a3faa484dc4c16694c6cc5022f /app/javascript
parent003bb6ca1a3f57ffb51092161d8f851b8dc93ab6 (diff)
Fix notification filters not applying to poll options
Diffstat (limited to 'app/javascript')
-rw-r--r--app/javascript/flavours/glitch/actions/notifications.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/actions/notifications.js b/app/javascript/flavours/glitch/actions/notifications.js
index be48b1c77..7effb07d1 100644
--- a/app/javascript/flavours/glitch/actions/notifications.js
+++ b/app/javascript/flavours/glitch/actions/notifications.js
@@ -14,6 +14,7 @@ import { unescapeHTML } from 'flavours/glitch/util/html';
 import { getFiltersRegex } from 'flavours/glitch/selectors';
 import { usePendingItems as preferPendingItems } from 'flavours/glitch/util/initial_state';
 import compareId from 'flavours/glitch/util/compare_id';
+import { searchTextFromRawStatus } from 'flavours/glitch/actions/importer/normalizer';
 
 export const NOTIFICATIONS_UPDATE = 'NOTIFICATIONS_UPDATE';
 
@@ -71,7 +72,7 @@ export function updateNotifications(notification, intlMessages, intlLocale) {
     if (notification.type === 'mention') {
       const dropRegex   = filters[0];
       const regex       = filters[1];
-      const searchIndex = notification.status.spoiler_text + '\n' + unescapeHTML(notification.status.content);
+      const searchIndex = searchTextFromRawStatus(notification.status);
 
       if (dropRegex && dropRegex.test(searchIndex)) {
         return;