diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-10-03 09:03:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-03 09:03:11 +0200 |
commit | 2aafdd0efb3fa0bf067e0b08a627a462793f296b (patch) | |
tree | d559e2dec7ceb4c446db973b5c040a708d1c5756 /app/models/follow.rb | |
parent | 9d7c323abdda66423751f3a25faf960674af8a49 (diff) | |
parent | 6ee768b7b285382fce3270ad4cf06c71838182d8 (diff) |
Merge pull request #1848 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/models/follow.rb')
-rw-r--r-- | app/models/follow.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/follow.rb b/app/models/follow.rb index a5e3fe809..e5cecbbc1 100644 --- a/app/models/follow.rb +++ b/app/models/follow.rb @@ -11,6 +11,7 @@ # show_reblogs :boolean default(TRUE), not null # uri :string # notify :boolean default(FALSE), not null +# languages :string is an Array # class Follow < ApplicationRecord @@ -27,6 +28,7 @@ class Follow < ApplicationRecord has_one :notification, as: :activity, dependent: :destroy validates :account_id, uniqueness: { scope: :target_account_id } + validates :languages, language: true scope :recent, -> { reorder(id: :desc) } @@ -35,7 +37,7 @@ class Follow < ApplicationRecord end def revoke_request! - FollowRequest.create!(account: account, target_account: target_account, show_reblogs: show_reblogs, notify: notify, uri: uri) + FollowRequest.create!(account: account, target_account: target_account, show_reblogs: show_reblogs, notify: notify, languages: languages, uri: uri) destroy! end |