FEATURE: New and Unread messages for user personal messages. (#13603)

* FEATURE: New and Unread messages for user personal messages.

Co-authored-by: awesomerobot <kris.aubuchon@discourse.org>
This commit is contained in:
Alan Guo Xiang Tan
2021-08-02 12:41:41 +08:00
committed by GitHub
parent fe3e18f981
commit 016efeadf6
41 changed files with 1274 additions and 431 deletions

View File

@ -545,8 +545,9 @@ class TopicTrackingState
group_user_ids = group.users.pluck(:id)
next if group_user_ids.blank?
group_channels = []
group_channels << "/private-messages/group/#{group.name.downcase}"
group_channels << "#{group_channels.first}/archive" if group_archive
channel_prefix = "/private-messages/group/#{group.name.downcase}"
group_channels << "#{channel_prefix}/inbox"
group_channels << "#{channel_prefix}/archive" if group_archive
group_channels.each { |channel| channels[channel] = group_user_ids }
end