FEATURE: Initial chat thread indicator and disabling echo mode in channels (#21047)

This commit introduces a new thread indicator for channels with `threading_enabled`
set to true and the `enable_exp` site setting set to true. In addition, in the main channel
stream we now hide all messages that are linked to threads except for the original message,
disabling the concept of an "echo mode" for now, we may revisit this in future. We also
remove the jigsaw puzzle "Open Thread" button for message actions, since the thread
indicator can just be used instead.

This also stops the `Chat::Publisher` from sending any messages related to chat
messages that are linked to a thread, unless that chat message is the OM of the
thread. A subsequent PR will link up all MessageBus events within the thread panel,
and for the message indicators.

Another subsequent PR will add the excerpt of the latest message in each thread,
as well as the avatars of the users messaging in the thread.

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
This commit is contained in:
Martin Brennan
2023-04-12 11:09:06 +10:00
committed by GitHub
parent f0435844df
commit 584a17c948
26 changed files with 506 additions and 79 deletions

View File

@ -42,6 +42,7 @@ module ChatSystemHelpers
last_message = creator.chat_message
end
last_message.thread.update!(replies_count: messages_count - 1)
last_message.thread
end
end