Fix notification filters not applying to poll options
This commit is contained in:
parent
a96bc45649
commit
bd1fc2f989
1 changed files with 2 additions and 1 deletions
|
@ -14,6 +14,7 @@ import { unescapeHTML } from 'flavours/glitch/util/html';
|
||||||
import { getFiltersRegex } from 'flavours/glitch/selectors';
|
import { getFiltersRegex } from 'flavours/glitch/selectors';
|
||||||
import { usePendingItems as preferPendingItems } from 'flavours/glitch/util/initial_state';
|
import { usePendingItems as preferPendingItems } from 'flavours/glitch/util/initial_state';
|
||||||
import compareId from 'flavours/glitch/util/compare_id';
|
import compareId from 'flavours/glitch/util/compare_id';
|
||||||
|
import { searchTextFromRawStatus } from 'flavours/glitch/actions/importer/normalizer';
|
||||||
|
|
||||||
export const NOTIFICATIONS_UPDATE = 'NOTIFICATIONS_UPDATE';
|
export const NOTIFICATIONS_UPDATE = 'NOTIFICATIONS_UPDATE';
|
||||||
|
|
||||||
|
@ -71,7 +72,7 @@ export function updateNotifications(notification, intlMessages, intlLocale) {
|
||||||
if (notification.type === 'mention') {
|
if (notification.type === 'mention') {
|
||||||
const dropRegex = filters[0];
|
const dropRegex = filters[0];
|
||||||
const regex = filters[1];
|
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)) {
|
if (dropRegex && dropRegex.test(searchIndex)) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue