diff options
author | Claire <claire.github-309c@sitedethib.com> | 2021-08-10 00:25:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-10 00:25:33 +0200 |
commit | 70b7ac9ff32a713e71a7ba6408a379b601c6839f (patch) | |
tree | f048b304f0d4f0f49e51c2edb8b74ccae6ac89e6 /app/models/concerns | |
parent | a61645ed30b854a1b4935026801eb5b287954095 (diff) | |
parent | 8681ef85d0728b9d34dc62785fab6fcec30ba95c (diff) |
Merge pull request #1583 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/models/concerns')
-rw-r--r-- | app/models/concerns/account_associations.rb | 3 | ||||
-rw-r--r-- | app/models/concerns/account_interactions.rb | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/app/models/concerns/account_associations.rb b/app/models/concerns/account_associations.rb index aaf371ebd..f2a4eae77 100644 --- a/app/models/concerns/account_associations.rb +++ b/app/models/concerns/account_associations.rb @@ -66,5 +66,8 @@ module AccountAssociations # Follow recommendations has_one :follow_recommendation_suppression, inverse_of: :account, dependent: :destroy + + # Account statuses cleanup policy + has_one :statuses_cleanup_policy, class_name: 'AccountStatusesCleanupPolicy', inverse_of: :account, dependent: :destroy end end diff --git a/app/models/concerns/account_interactions.rb b/app/models/concerns/account_interactions.rb index 958f6c78e..4bf62539c 100644 --- a/app/models/concerns/account_interactions.rb +++ b/app/models/concerns/account_interactions.rb @@ -81,6 +81,9 @@ module AccountInteractions has_many :following, -> { order('follows.id desc') }, through: :active_relationships, source: :target_account has_many :followers, -> { order('follows.id desc') }, through: :passive_relationships, source: :account + # Account notes + has_many :account_notes, dependent: :destroy + # Block relationships has_many :block_relationships, class_name: 'Block', foreign_key: 'account_id', dependent: :destroy has_many :blocking, -> { order('blocks.id desc') }, through: :block_relationships, source: :target_account |