mirror of
https://github.com/mastodon/mastodon.git
synced 2024-08-20 21:08:15 -07:00
Delete pending notification requests on block and notification mutes (#31310)
This commit is contained in:
parent
9d0cafd06b
commit
5d890ebc57
1 changed files with 5 additions and 0 deletions
|
@ -7,6 +7,7 @@ class AfterBlockService < BaseService
|
|||
|
||||
clear_home_feed!
|
||||
clear_list_feeds!
|
||||
clear_notification_requests!
|
||||
clear_notifications!
|
||||
clear_conversations!
|
||||
end
|
||||
|
@ -28,4 +29,8 @@ class AfterBlockService < BaseService
|
|||
def clear_notifications!
|
||||
Notification.where(account: @account).where(from_account: @target_account).in_batches.delete_all
|
||||
end
|
||||
|
||||
def clear_notification_requests!
|
||||
NotificationRequest.where(account: @account, from_account: @target_account).destroy_all
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue