Improve message visibility for added/removed users
Closed this issue · 0 comments
dtdesign commented
The current implementation is somewhat weird, or at least a bit weird, when it comes to users being added to existing conversations. These users will see all messages of this conversation, regardless if this is the intended behavior or not. On top of that, the conversation starter can remove participants at any time, that not only locks people out of the conversation, but also virtually deletes it for them.
- Add two new fields to
wcf1_conversation_to_user
that track the time at which a user joined/left a conversation, the special value0
equals "unrestricted".-
joinedAt
to show only messages that were posted exactly then and in the future. -
leftAt
is the opposite ofjoinedAt
.
-
- Removing a user from a conversation sets
leftAt
, but does no longer changehideConversation
. - Add additional users to a conversation should offer the option to grant them full access (
joinedAt = 0
), or to restrict visibility of previous messages (joinedAt = TIME_NOW
). - Checks for
hideConversation = 2
(STATE_LEFT
) need to be adjusted to check forleftAt
too. - Add
wcf1_conversation_to_user.lastMessageID
, that is set whenever a user is removed from a conversation, making it faster to adjust the "last reply"-column.
See https://community.woltlab.com/thread/257471-konversation-teilnehmer-entfernen-verhalten-so-gewollt/
See https://community.woltlab.com/thread/258903-kein-verlauf-f%C3%BCr-neue-konversations-teilnehmer/