This commit is contained in:
mgabdev
2020-04-01 23:17:21 -04:00
parent 1a33759e19
commit 80d41b8d94
50 changed files with 1771 additions and 610 deletions

View File

@@ -70,12 +70,13 @@ export const makeGetStatus = () => {
(state, { id }) => state.getIn(['statuses', state.getIn(['statuses', id, 'quote_of_id'])]),
(state, { id }) => state.getIn(['statuses', state.getIn(['statuses', id, 'reblog'])]),
(state, { id }) => state.getIn(['accounts', state.getIn(['statuses', id, 'account'])]),
(state, { id }) => state.getIn(['accounts', state.getIn(['statuses', state.getIn(['statuses', id, 'quote_of_id']), 'account'])]),
(state, { id }) => state.getIn(['accounts', state.getIn(['statuses', state.getIn(['statuses', id, 'reblog']), 'account'])]),
(state, { username }) => username,
getFilters,
],
(statusBase, quotedStatus, statusRepost, accountBase, accountRepost, username, filters) => {
(statusBase, quotedStatus, statusRepost, accountBase, accountQuoted, accountRepost, username, filters) => {
if (!statusBase) {
return null;
}
@@ -92,6 +93,10 @@ export const makeGetStatus = () => {
statusRepost = null;
}
if (quotedStatus) {
quotedStatus = quotedStatus.set('account', accountQuoted);
}
const regex = (accountRepost || accountBase).get('id') !== me && regexFromFilters(filters);
const filtered = regex && regex.test(statusBase.get('reblog') ? statusRepost.get('search_index') : statusBase.get('search_index'));