mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 10:20:58 -06:00
FIX: email summary subject order should be consistent (#19469)
This commit is contained in:
parent
4e42759caa
commit
fa8d6860b1
@ -63,7 +63,9 @@ module Chat::UserNotificationsExtension
|
||||
all_channels = grouped_messages.keys
|
||||
grouped_channels = all_channels.partition { |c| !c.direct_message_channel? }
|
||||
channels = grouped_channels.first
|
||||
dm_users = grouped_channels.last.flat_map { |c| grouped_messages[c].map(&:user) }.uniq
|
||||
|
||||
dm_messages = grouped_channels.last.flat_map { |c| grouped_messages[c] }
|
||||
dm_users = dm_messages.sort_by(&:created_at).uniq { |m| m.user_id }.map(&:user)
|
||||
|
||||
# Prioritize messages from regular channels over direct messages
|
||||
if channels.any?
|
||||
|
Loading…
Reference in New Issue
Block a user