0
0
Fork 0

Add optional OAuth application to reports (#30539)

This commit is contained in:
Emelia Smith 2024-07-16 15:23:08 +02:00 committed by GitHub
parent fa54b61216
commit aa88aca0ad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 47 additions and 3 deletions

View file

@ -18,6 +18,7 @@
# category :integer default("other"), not null
# action_taken_at :datetime
# rule_ids :bigint(8) is an Array
# application_id :bigint(8)
#
class Report < ApplicationRecord
@ -31,6 +32,7 @@ class Report < ApplicationRecord
rate_limit by: :account, family: :reports
belongs_to :account
belongs_to :application, class_name: 'Doorkeeper::Application', optional: true
with_options class_name: 'Account' do
belongs_to :target_account