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

@ -220,12 +220,16 @@ Fabricator(:chat_thread, class_name: "Chat::Thread") do
thread.add(thread.original_message_user)
if transients[:with_replies]
Fabricate.times(
transients[:with_replies],
:chat_message,
thread: thread,
use_service: transients[:use_service],
)
Fabricate
.times(
transients[:with_replies],
:chat_message,
thread: thread,
use_service: transients[:use_service],
)
.each { |message| thread.add(message.user) }
thread.update!(replies_count: transients[:with_replies])
end
end
end