Change notification request acceptance to immediately delete the request (#31256)

This commit is contained in:
Claire 2024-08-14 09:34:30 +02:00 committed by GitHub
parent 3e3450be36
commit 7996a9543d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 83 additions and 6 deletions

View file

@ -3,6 +3,7 @@
class AcceptNotificationRequestService < BaseService
def call(request)
NotificationPermission.create!(account: request.account, from_account: request.from_account)
UnfilterNotificationsWorker.perform_async(request.id)
UnfilterNotificationsWorker.perform_async(request.account_id, request.from_account_id)
request.destroy!
end
end