Add option to be notified when a followed user posts (#13546)
* Add bell button Fix #4890 * Remove duplicate type from post-deployment migration * Fix legacy class type mappings * Improve query performance with better index * Fix validation * Remove redundant index from notifications
This commit is contained in:
parent
75e4bd9413
commit
974b1b79ce
42 changed files with 330 additions and 112 deletions
|
@ -11,6 +11,7 @@ class RefollowWorker
|
|||
|
||||
target_account.passive_relationships.where(account: Account.where(domain: nil)).includes(:account).reorder(nil).find_each do |follow|
|
||||
reblogs = follow.show_reblogs?
|
||||
notify = follow.notify?
|
||||
|
||||
# Locally unfollow remote account
|
||||
follower = follow.account
|
||||
|
@ -18,7 +19,7 @@ class RefollowWorker
|
|||
|
||||
# Schedule re-follow
|
||||
begin
|
||||
FollowService.new.call(follower, target_account, reblogs: reblogs)
|
||||
FollowService.new.call(follower, target_account, reblogs: reblogs, notify: notify)
|
||||
rescue Mastodon::NotPermittedError, ActiveRecord::RecordNotFound, Mastodon::UnexpectedResponseError, HTTP::Error, OpenSSL::SSL::SSLError
|
||||
next
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue