diff --git a/app/models/message.rb b/app/models/message.rb index d4036416e..ca50d4faf 100644 --- a/app/models/message.rb +++ b/app/models/message.rb @@ -123,12 +123,12 @@ class Message < ApplicationRecord belongs_to :conversation, touch: true belongs_to :sender, polymorphic: true, optional: true + after_create_commit :execute_after_create_commit_callbacks + has_many :attachments, dependent: :destroy, autosave: true, before_add: :validate_attachments_limit has_one :csat_survey_response, dependent: :destroy_async has_many :notifications, as: :primary_actor, dependent: :destroy_async - after_create_commit :execute_after_create_commit_callbacks - after_update_commit :dispatch_update_event def channel_token