Skip to content

Commit

Permalink
Delete pending notification requests on block and notification mutes (m…
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire authored Aug 6, 2024
1 parent 9d0cafd commit 5d890eb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/services/after_block_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ def call(account, target_account)

clear_home_feed!
clear_list_feeds!
clear_notification_requests!
clear_notifications!
clear_conversations!
end
Expand All @@ -28,4 +29,8 @@ def clear_conversations!
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

0 comments on commit 5d890eb

Please sign in to comment.