chore: Delete related notifications if a conversation is deleted (#2592)

This commit is contained in:
Muhsin Keloth
2021-07-12 12:28:16 +05:30
committed by GitHub
parent 5726447e47
commit ba547b3f60
4 changed files with 22 additions and 1 deletions

View File

@@ -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