|
@ -22,6 +22,7 @@ class FollowRequest < ApplicationRecord |
|
|
has_one :notification, as: :activity, dependent: :destroy |
|
|
has_one :notification, as: :activity, dependent: :destroy |
|
|
|
|
|
|
|
|
validates :account_id, uniqueness: { scope: :target_account_id } |
|
|
validates :account_id, uniqueness: { scope: :target_account_id } |
|
|
|
|
|
validates_with FollowLimitValidator, on: :create |
|
|
|
|
|
|
|
|
def authorize! |
|
|
def authorize! |
|
|
account.follow!(target_account, reblogs: show_reblogs, uri: uri) |
|
|
account.follow!(target_account, reblogs: show_reblogs, uri: uri) |
|
|