From ef1d660596e7d760911a0467454d35318c73c398 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Mon, 9 Jul 2018 23:44:01 +0200 Subject: [PATCH] make sure reblogged's filter is set correctly --- app/javascript/flavours/glitch/selectors/index.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/javascript/flavours/glitch/selectors/index.js b/app/javascript/flavours/glitch/selectors/index.js index d0212c379d6..b713a13a637 100644 --- a/app/javascript/flavours/glitch/selectors/index.js +++ b/app/javascript/flavours/glitch/selectors/index.js @@ -66,14 +66,18 @@ export const makeGetStatus = () => { return null; } + const regex = regexFromFilters(filters); + let filtered = false; + if (statusReblog) { + filtered = regex && regex.test(statusReblog.get('search_index')); statusReblog = statusReblog.set('account', accountReblog); + statusReblog = statusReblog.set('filtered', filtered); } else { statusReblog = null; } - const regex = regexFromFilters(filters); - const filtered = regex && regex.test(statusBase.get('reblog') ? statusReblog.get('search_index') : statusBase.get('search_index')); + filtered = filtered || regex && regex.test(statusBase.get('search_index')); return statusBase.withMutations(map => { map.set('reblog', statusReblog);