From 2146ac91a004bad2a6c4dc1d01599a85515928f5 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 26 Dec 2016 21:52:03 +0100 Subject: Follow requests send e-mail notifications, but are excluded from notifications API Better initial state for unlisted/nsfw toggles --- app/models/follow_request.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/models/follow_request.rb') diff --git a/app/models/follow_request.rb b/app/models/follow_request.rb index b46065d53..8eef3abf4 100644 --- a/app/models/follow_request.rb +++ b/app/models/follow_request.rb @@ -6,6 +6,8 @@ class FollowRequest < ApplicationRecord belongs_to :account belongs_to :target_account, class_name: 'Account' + has_one :notification, as: :activity, dependent: :destroy + validates :account, :target_account, presence: true validates :account_id, uniqueness: { scope: :target_account_id } -- cgit