How did you count 30? Are we looking at the same picture?
I counted 9.
- channel is muted and message not in a thread the user is subscribed to
- user in dnd-mode and there's no dnd-override
- this is a @channel mention but @channel mentions are suppressed
- message is for a thread user is subscribed to but channel notification perf is nothing
- notification preference for device is set to "never"
- @here mention but user is not active (not here)
- highlighted word in a thread message the user is not subscribed to
- channel notification preference is set to nothing
- I couldn't understand this condition (@mention in a comment on a file not owned by user?)
You can check these conditions sequentially and if any of them match, return false.
The last statement in the function would just `return true`.
The function needs a struct representing user preferences and a struct representing what's being currently parsed as inputs.
It's really not that complicated.