Remove status in antenna list or home
This commit is contained in:
parent
2a1a2da06a
commit
aff182ce63
1 changed files with 10 additions and 0 deletions
|
@ -26,6 +26,7 @@ class RemoveStatusService < BaseService
|
||||||
remove_from_self if @account.local?
|
remove_from_self if @account.local?
|
||||||
remove_from_followers
|
remove_from_followers
|
||||||
remove_from_lists
|
remove_from_lists
|
||||||
|
remove_from_antennas
|
||||||
|
|
||||||
# There is no reason to send out Undo activities when the
|
# There is no reason to send out Undo activities when the
|
||||||
# cause is that the original object has been removed, since
|
# cause is that the original object has been removed, since
|
||||||
|
@ -68,6 +69,15 @@ class RemoveStatusService < BaseService
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def remove_from_antennas
|
||||||
|
Antenna.availables.where.not(list_id: 0).select(:id, :list_id, :account_id).includes(account: :user).reorder(nil).find_each do |antenna|
|
||||||
|
FeedManager.instance.unpush_from_list(antenna.list, @status) if antenna.list.present?
|
||||||
|
end
|
||||||
|
Antenna.availables.where(list_id: 0).select(:id, :account_id).includes(account: :user).reorder(nil).find_each do |antenna|
|
||||||
|
FeedManager.instance.unpush_from_home(antenna.account, @status)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def remove_from_mentions
|
def remove_from_mentions
|
||||||
# For limited visibility statuses, the mentions that determine
|
# For limited visibility statuses, the mentions that determine
|
||||||
# who receives them in their home feed are a subset of followers
|
# who receives them in their home feed are a subset of followers
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue