mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 01:38:10 +08:00
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:
@ -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
|
||||
|
Reference in New Issue
Block a user