FEATURE: my threads page (#24771)

This commit adds a new "My threads" link in sidebar and drawer. This link will open the "/chat/threads" page which contains all threads where the current user is a member. It's ordered by activity (unread and then last message created).

Moreover, the threads list of a channel page is now showing every threads of a channel, and not just the ones where you are a member.
This commit is contained in:
Joffrey JAFFEUX
2023-12-11 07:38:07 +01:00
committed by GitHub
parent 4949d85c15
commit 09277bc543
75 changed files with 1419 additions and 227 deletions

View File

@ -491,6 +491,9 @@ en:
create_export: "Create export"
export_has_started: "The export has started. You'll receive a PM when it's ready."
my_threads:
title: My threads
direct_messages:
title: "Personal chat"
new: "Create a personal chat"

View File

@ -4,7 +4,8 @@ Chat::Engine.routes.draw do
namespace :api, defaults: { format: :json } do
get "/chatables" => "chatables#index"
get "/channels" => "channels#index"
get "/channels/me" => "current_user_channels#index"
get "/me/channels" => "current_user_channels#index"
get "/me/threads" => "current_user_threads#index"
post "/channels" => "channels#create"
put "/channels/read/" => "reads#update_all"
put "/channels/:channel_id/read/:message_id" => "reads#update"
@ -72,6 +73,7 @@ Chat::Engine.routes.draw do
# chat_controller routes
get "/" => "chat#respond"
get "/threads" => "chat#respond"
get "/browse" => "chat#respond"
get "/browse/all" => "chat#respond"
get "/browse/closed" => "chat#respond"