chore: Delete related notifications if a conversation is deleted (#2592)
This commit is contained in:
@@ -61,6 +61,7 @@ class Conversation < ApplicationRecord
|
||||
|
||||
has_many :messages, dependent: :destroy, autosave: true
|
||||
has_one :csat_survey_response, dependent: :destroy
|
||||
has_many :notifications, as: :primary_actor, dependent: :destroy
|
||||
|
||||
before_create :set_bot_conversation
|
||||
|
||||
|
||||
Reference in New Issue
Block a user