[Feature] Change conversation ordering (#640)

* Update conversation's updated_at when a message is created/saved
* changed teh ordering of conversation to be based on `updated_at` rather than `created_at`
This commit is contained in:
Sony Mathew
2020-03-24 23:34:22 +05:30
committed by GitHub
parent 2eac97c705
commit 209e0a0fb4
2 changed files with 2 additions and 2 deletions

View File

@@ -51,7 +51,7 @@ class Message < ApplicationRecord
belongs_to :account
belongs_to :inbox
belongs_to :conversation
belongs_to :conversation, touch: true
belongs_to :user, required: false
belongs_to :contact, required: false