nas/app/models/pending_follow_request.rb
KMY(雪あすか) dfc9f35d71
Add: #586 保留中のリモートアカウントからのフォローが飛んできた場合に記録する (#590)
* Add: #586 保留中のリモートアカウントからのフォローが飛んできた場合に記録する

* 本家に戻す処理を修正

* Fix test

* Fix worker link

* Fix test

* リモートアカウント拒否時に既存のリクエストを削除
2024-02-18 10:48:48 +09:00

19 lines
593 B
Ruby

# frozen_string_literal: true
# == Schema Information
#
# Table name: pending_follow_requests
#
# id :bigint(8) not null, primary key
# account_id :bigint(8) not null
# target_account_id :bigint(8) not null
# uri :string not null
# created_at :datetime not null
# updated_at :datetime not null
#
class PendingFollowRequest < ApplicationRecord
belongs_to :account
belongs_to :target_account, class_name: 'Account'
validates :account_id, uniqueness: { scope: :target_account_id }
end