Merge remote-tracking branch 'origin/master' into merge-upstream

This commit is contained in:
David Yip
2017-11-17 17:40:00 -06:00
67 changed files with 851 additions and 218 deletions

View File

@@ -14,6 +14,7 @@ class RemoveStatusService < BaseService
remove_from_self if status.account.local?
remove_from_followers
remove_from_lists
remove_from_affected
remove_reblogs
remove_from_hashtags
@@ -31,12 +32,18 @@ class RemoveStatusService < BaseService
private
def remove_from_self
unpush(:home, @account, @status)
FeedManager.instance.unpush_from_home(@account, @status)
end
def remove_from_followers
@account.followers.local.find_each do |follower|
unpush(:home, follower, @status)
FeedManager.instance.unpush_from_home(follower, @status)
end
end
def remove_from_lists
@account.lists.select(:id, :account_id).find_each do |list|
FeedManager.instance.unpush_from_list(list, @status)
end
end
@@ -102,10 +109,6 @@ class RemoveStatusService < BaseService
end
end
def unpush(type, receiver, status)
FeedManager.instance.unpush(type, receiver, status)
end
def remove_from_hashtags
return unless @status.public_visibility?