"Show reblogs" per-follower UI/database changes

TODO:

* Tests (particularly for FollowRequests).
* Anything to respect the setting when putting reblogs in timelines.
This commit is contained in:
aschmitz
2017-11-09 08:41:10 -06:00
parent 870d71b78b
commit 4944515020
12 changed files with 82 additions and 20 deletions

View File

@ -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!