FIX: Thread mention read state and notification links (#21385)

* FIX: Link to thread for mentions inside thread

When mentioning a user in a thread, when we send the
notification and display it in the UI we want the URL
of the notification to point to the thread URL to open
the panel, rather than the main channel which is confusing.

For now, we don't have a way to highlight the linked-to message
in the thread, we can revisit this later.

* FIX: Mark mention notifications read when thread opens

Since we have no scrolling/message visibility/thread membership
for now, when a user opens the thread panel we just want to mark
all mention notifications relating to messages in the thread
for the user as read.
This commit is contained in:
Martin Brennan
2023-05-04 17:28:51 +02:00
committed by GitHub
parent e7faef9d65
commit b2a727336e
16 changed files with 365 additions and 16 deletions

View File

@ -29,6 +29,7 @@ Chat::Engine.routes.draw do
get "/mentions/groups" => "hints#check_group_mentions", :format => :json
get "/channels/:channel_id/threads/:thread_id" => "channel_threads#show"
put "/channels/:channel_id/threads/:thread_id/read" => "thread_reads#update"
put "/channels/:channel_id/messages/:message_id/restore" => "channel_messages#restore"
delete "/channels/:channel_id/messages/:message_id" => "channel_messages#destroy"