From cfc0cc936fc0f3f6dbe545a2b54221224012c6e8 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Sun, 19 Feb 2017 16:00:28 -0500 Subject: [PATCH] FIX: Get a room wasn't enforcing sequential properly --- lib/composer_messages_finder.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/composer_messages_finder.rb b/lib/composer_messages_finder.rb index af738f4e867..04893ebda80 100644 --- a/lib/composer_messages_finder.rb +++ b/lib/composer_messages_finder.rb @@ -146,6 +146,7 @@ class ComposerMessagesFinder last_x_replies = @topic. posts. where(user_id: @user.id). + order('created_at desc'). limit(SiteSetting.get_a_room_threshold). pluck(:reply_to_user_id). find_all {|uid| uid != @user.id && uid == reply_to_user_id}