From e419cd5a0713eaa16ae8067ce8008dca33d220d3 Mon Sep 17 00:00:00 2001 From: Pranav Date: Wed, 28 Jan 2026 11:12:20 -0800 Subject: [PATCH] Update created_at here --- app/models/message.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/message.rb b/app/models/message.rb index 3be04c54f..25a26afa9 100644 --- a/app/models/message.rb +++ b/app/models/message.rb @@ -114,7 +114,7 @@ class Message < ApplicationRecord scope :created_since, ->(datetime) { where('created_at > ?', datetime) } scope :chat, -> { where.not(message_type: :activity).where(private: false) } - scope :non_activity_messages, -> { where.not(message_type: :activity).reorder('id desc') } + scope :non_activity_messages, -> { where.not(message_type: :activity).reorder('created_at desc') } scope :today, -> { where("date_trunc('day', created_at) = ?", Date.current) } scope :voice_calls, -> { where(content_type: :voice_call) }