7864748be9
Each target now implements process directly with its own logic, rather than using processable?/perform_push hooks. The pushable? check is done once in Notification#push before iterating targets. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
13 lines
314 B
Ruby
13 lines
314 B
Ruby
class Notification::PushTarget::Web < Notification::PushTarget
|
|
def process
|
|
if subscriptions.any?
|
|
Rails.configuration.x.web_push_pool.queue(notification.payload.to_h, subscriptions)
|
|
end
|
|
end
|
|
|
|
private
|
|
def subscriptions
|
|
@subscriptions ||= notification.user.push_subscriptions
|
|
end
|
|
end
|