Allow notification filter policy to also mute notifications #2799
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related to:
The new notification filters are great! unfortunately they remove some ability to completely hide unsolicited DMs, which is a problem as described above^
This PR makes the new notification filters behave like the existing status content filters so that one can either filter them with a message or mute them entirely. I took some of the existing components and styles from the other toggle settings so that it looks like this:
I have confirmed that it works, unsolicited dms simply don't show up in notifications or in the DM page, but i receive them as normal if i follow an account. same with the other settings. I am holding off on writing tests until i hear if this would be something y'all would be interested in, but if so then i would be happy to write them/improve the implementation however would be good :)
This is definitely not the best implementation, but i did it in such a way that i touch the existing behavior from upstream masto as little as possible - eg. ideally this would be an
enum
rather than two sets of boolean values, and i wouldn't be reusing theFilterCondition
class like that but would instead refactor those methods out into a mixin, but thus is the fork of a fork lifestyle.anyway lmk if this is unwanted and we can just test and deploy it on our fork, or any other changes!