A platform for community discussion. Free, open, simple.
DEV: makes test more deterministic (#20078)
Joffrey JAFFEUX06ad13b51794
diff --git a/plugins/chat/lib/extensions/user_notifications_extension.rb b/plugins/chat/lib/extensions/user_notifications_extension.rbindex a054b108d85..b64004c3a3b 100644--- a/plugins/chat/lib/extensions/user_notifications_extension.rb+++ b/plugins/chat/lib/extensions/user_notifications_extension.rb@@ -69,7 +69,10 @@ module Chat::UserNotificationsExtension# Prioritize messages from regular channels over direct messagesif channels.any?- channel_notification_text(channels.sort_by(&:last_message_sent_at), dm_users)+ channel_notification_text(+ channels.sort_by { |channel| [channel.last_message_sent_at, channel.created_at] },+ dm_users,+ )elsedirect_message_notification_text(dm_users)end