mirror of
https://github.com/glitch-soc/mastodon.git
synced 2024-11-27 02:24:03 -05:00
Add username to the status regex filter
This commit is contained in:
parent
bb98d970e3
commit
22fca8d4d6
@ -26,7 +26,8 @@ const makeGetStatusIds = (pending = false) => createSelector([
|
||||
(state, { type }) => state.getIn(['timelines', type, pending ? 'pendingItems' : 'items'], ImmutableList()),
|
||||
(state) => state.get('statuses'),
|
||||
getRegex,
|
||||
], (columnSettings, statusIds, statuses, regex) => {
|
||||
(state) => state.get('accounts'),
|
||||
], (columnSettings, statusIds, statuses, regex, accounts) => {
|
||||
return statusIds.filter(id => {
|
||||
if (id === null) return true;
|
||||
|
||||
@ -49,7 +50,8 @@ const makeGetStatusIds = (pending = false) => createSelector([
|
||||
|
||||
if (showStatus && regex) {
|
||||
const searchIndex = statusForId.get('reblog') ? statuses.getIn([statusForId.get('reblog'), 'search_index']) : statusForId.get('search_index');
|
||||
showStatus = !regex.test(searchIndex);
|
||||
const acct = accounts.getIn([statusForId.get('account'), 'acct']);
|
||||
showStatus = !regex.test(acct + '\n' + searchIndex);
|
||||
}
|
||||
|
||||
return showStatus;
|
||||
|
Loading…
Reference in New Issue
Block a user