mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-27 17:21:36 +01:00
[Glitch] Completely hide toots matched by “irreversible” filters even if they got to the client
This commit is contained in:
parent
032a669622
commit
3771a993b7
2 changed files with 11 additions and 0 deletions
|
@ -62,9 +62,14 @@ export function updateNotifications(notification, intlMessages, intlLocale) {
|
||||||
let filtered = false;
|
let filtered = false;
|
||||||
|
|
||||||
if (notification.type === 'mention') {
|
if (notification.type === 'mention') {
|
||||||
|
const dropRegex = regexFromFilters(filters.filter(filter => filter.get('irreversible')));
|
||||||
const regex = regexFromFilters(filters);
|
const regex = regexFromFilters(filters);
|
||||||
const searchIndex = notification.status.spoiler_text + '\n' + unescapeHTML(notification.status.content);
|
const searchIndex = notification.status.spoiler_text + '\n' + unescapeHTML(notification.status.content);
|
||||||
|
|
||||||
|
if (dropRegex && dropRegex.test(searchIndex)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
filtered = regex && regex.test(searchIndex);
|
filtered = regex && regex.test(searchIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,6 +78,12 @@ export const makeGetStatus = () => {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const dropRegex = (accountReblog || accountBase).get('id') !== me && regexFromFilters(filters.filter(filter => filter.get('irreversible')));
|
||||||
|
|
||||||
|
if (dropRegex && dropRegex.test(statusBase.get('reblog') ? statusReblog.get('search_index') : statusBase.get('search_index'))) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
const regex = (accountReblog || accountBase).get('id') !== me && regexFromFilters(filters);
|
const regex = (accountReblog || accountBase).get('id') !== me && regexFromFilters(filters);
|
||||||
let filtered = false;
|
let filtered = false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue