about summary refs log tree commit diff
path: root/app/models/follow_request.rb
diff options
context:
space:
mode:
authorbeatrix <beatrix.bitrot@gmail.com>2017-11-15 12:01:17 -0500
committerGitHub <noreply@github.com>2017-11-15 12:01:17 -0500
commit04508868b07f5631eddda3e4d8240dde9b751fd4 (patch)
treedfef112d85f778bcebb24f4c3d76c28c0e422a9e /app/models/follow_request.rb
parentbfd9230d61effe537874f02de87b6415bae45ae1 (diff)
parent9a42f7cbed28ca010eca6cef89298ab806ce298f (diff)
Merge pull request #212 from aschmitz/feat/mute-reblogs
Allow hiding reblogs on a per-follow basis
Diffstat (limited to 'app/models/follow_request.rb')
-rw-r--r--app/models/follow_request.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/follow_request.rb b/app/models/follow_request.rb
index 60036d903..1a1c52382 100644
--- a/app/models/follow_request.rb
+++ b/app/models/follow_request.rb
@@ -8,6 +8,7 @@
 #  account_id        :integer          not null
 #  id                :integer          not null, primary key
 #  target_account_id :integer          not null
+#  show_reblogs      :boolean          default(TRUE), not null
 #
 
 class FollowRequest < ApplicationRecord
@@ -21,7 +22,7 @@ class FollowRequest < ApplicationRecord
   validates :account_id, uniqueness: { scope: :target_account_id }
 
   def authorize!
-    account.follow!(target_account)
+    account.follow!(target_account, reblogs: show_reblogs)
     MergeWorker.perform_async(target_account.id, account.id)
 
     destroy!