Fix removing status on antenna timeline
This commit is contained in:
parent
4f86a8cb57
commit
ade23645ee
3 changed files with 15 additions and 1 deletions
|
@ -47,6 +47,7 @@ class BatchedRemoveStatusService < BaseService
|
|||
|
||||
unpush_from_home_timelines(account, account_statuses)
|
||||
unpush_from_list_timelines(account, account_statuses)
|
||||
unpush_from_antenna_timelines(account, account_statuses)
|
||||
end
|
||||
|
||||
# Cannot be batched
|
||||
|
@ -76,6 +77,14 @@ class BatchedRemoveStatusService < BaseService
|
|||
end
|
||||
end
|
||||
|
||||
def unpush_from_antenna_timelines(_account, statuses)
|
||||
Antenna.availables.select(:id, :account_id).includes(account: :user).reorder(nil).find_each do |antenna|
|
||||
statuses.each do |status|
|
||||
FeedManager.instance.unpush_from_antenna(antenna, status)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def unpush_from_public_timelines(status, pipeline)
|
||||
return unless status.public_visibility? && status.id > @status_id_cutoff
|
||||
|
||||
|
|
|
@ -81,6 +81,9 @@ class RemoveStatusService < BaseService
|
|||
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
|
||||
Antenna.availables.select(:id, :account_id).includes(account: :user).reorder(nil).find_each do |antenna|
|
||||
FeedManager.instance.unpush_from_antenna(antenna, @status)
|
||||
end
|
||||
end
|
||||
|
||||
def remove_from_mentions
|
||||
|
|
|
@ -486,6 +486,8 @@ const startServer = async () => {
|
|||
return 'direct';
|
||||
case '/api/v1/streaming/list':
|
||||
return 'list';
|
||||
case '/api/v1/streaming/antenna':
|
||||
return 'antenna';
|
||||
default:
|
||||
return undefined;
|
||||
}
|
||||
|
@ -1267,7 +1269,7 @@ const startServer = async () => {
|
|||
if (channelName === 'list') {
|
||||
return [channelName, params.list];
|
||||
} else if (channelName === 'antenna') {
|
||||
return [channelName, params.antenna];
|
||||
return [channelName, params.antenna];
|
||||
} else if (['hashtag', 'hashtag:local'].includes(channelName)) {
|
||||
return [channelName, params.tag];
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue