about summary refs log tree commit diff
path: root/app/models/follow_request.rb
diff options
context:
space:
mode:
authoraschmitz <aschmitz@lardbucket.org>2017-11-09 08:41:10 -0600
committeraschmitz <aschmitz@lardbucket.org>2017-11-09 08:41:10 -0600
commit49445150202f0bdaae942b9ae1ba44802a1c22e9 (patch)
tree5d305bb395d7e61ec6b2f0e4b48229ebf216be8d /app/models/follow_request.rb
parent870d71b78be74b7fab4892a79a87aff39b1e2726 (diff)
"Show reblogs" per-follower UI/database changes
TODO:

* Tests (particularly for FollowRequests).
* Anything to respect the setting when putting reblogs in timelines.
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..0608ffabc 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: reblogs)
     MergeWorker.perform_async(target_account.id, account.id)
 
     destroy!