From 4b6e75512f444695c33302de01759491f1150861 Mon Sep 17 00:00:00 2001 From: fef Date: Wed, 7 Dec 2022 12:47:03 +0000 Subject: [PATCH] delete reaction notifications when deleting status --- app/models/status_reaction.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/models/status_reaction.rb b/app/models/status_reaction.rb index 0833a7eafd..00be17e231 100644 --- a/app/models/status_reaction.rb +++ b/app/models/status_reaction.rb @@ -16,6 +16,8 @@ class StatusReaction < ApplicationRecord belongs_to :status, inverse_of: :status_reactions belongs_to :custom_emoji, optional: true + has_one :notification, as: :activity, dependent: :destroy + validates :name, presence: true validates_with StatusReactionValidator