Clarify expected behaviour of mutes (word, user, instance)
(this is going to be long, and require discussion)
There are many situations in which we need to decide if and how to display a particular note. This is an attempt to catalogue them all, and start a discussion on what behaviour we want to implement. After that, we can compare with the current implementation, and try to align the two (there may be technical reasons why some behaviour we want can't be implemented, but let's not worry about this right now).
Let's start with some lists. In the following, "I"/"me" is the currently logged-in user; "we" is the Sharkey program.
A note can be:
- a singular note (not a reply or a boost)
- a reply
- a boost
- a quote
A note can contain:
- words I muted
- words I hard muted
- none of the above
A note can mention me,
- mentions me?
A user can have several kind of relationships with me:
- they blocked me
- I follow them
- I want to see their "replies to others"
- I muted them
- I muted their boosts
A user's instance can be:
- globally blocked
- globally muted or muted by me
- local or none of the above
A note can be shown in various contexts:
- home timeline
- notifications
- other timeline, channel, antenna
- note detail (looking at the note)
- note detail (in the replies, either at first load or via real-time updates)
- note detail (among the ancestors)
What follows is @dakkar's understanding of the behaviours we want, including all the questions he has.
Let's get some simple cases out of the way:
- note from blocked instance: we don't even store the note, so we
never show it
- this currently implies (@dakkar thinks) that we don't store replies or boosts or quotes of those notes, either; is this what we want?
- note from a user that blocked me: we must never show it
Now let's look at the various contexts:
-
every timeline, channel, antenna:
- don't show notes from users I muted
- don't show boosts from users whose boosts I muted
- notes from muted instances are not shown, unless I follow the author
- notes with muted words are shown collapsed
- singular notes with hard-muted words are not shown
- no replies from users I marked as "don't show replies to others in timeline" (this obviously applies to the home timeline; should it apply to other timelines, channels, antennas?)
- if we would not show a parent note, what do we do with the reply?
e.g. parent contains hard-muted words, parent is from user who
blocked us, parent is from user I muted
- if a parent note contains (non hard-) muted words, we show it collapsed
- if we would not show a note, what do we do with a quote of it?
e.g. quoted contains hard-muted words, quoted is from user who
blocked us, quoted is from user I muted
- if the quoted note contains (non hard-) muted words, we show it collapsed (?)
- does the fact that a note mentions me (or replies to me, or quotes me) alter any of the above?
-
home timeline: like other timelines, but:
- no singular notes, or replies, or boosts, from users I don't follow
-
notifications:
- only notes that mention me, are replies to me, are boosting me,
or are quoting me
- no notes from muted users
- no notes from muted instances, unless I follow the author
- how do we handle muted words? hard-muted words?
- only notes that mention me, are replies to me, are boosting me,
or are quoting me
-
detailed view:
- always show the note in full, even when it contains muted or hard
muted words, or is from a muted user or a muted instance
- still, never show a note from a user who blocked me
- always show the note in full, even when it contains muted or hard
muted words, or is from a muted user or a muted instance
-
detailed view, "conversation" section (ancestors of the note we're looking at):
- notes with muted words are shown collapsed
- what about the other mutes? do we truncate the ancestry, or show a placeholder and carry on?
- what about ancestor notes from users who blocked us?
- this is the same as the question of parent notes in timelines, but recursive
- notes with muted words are shown collapsed
-
detailed view, "replies" section:
- notes with muted words are shown collapsed
- notes with hard-muted words, or from muted users, or from users who blocked us, that do not have replies of their own, are not shown
- what if they do have replies? do we truncate the branch, or show a placeholder and carry on?
- this is like the previous section, but upside-down
- notes with muted words are shown collapsed
please discuss!