mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-02-21 20:20:34 +09:00
8 lines
246 B
Ruby
8 lines
246 B
Ruby
class Push::Subscription < ApplicationRecord
|
|
belongs_to :user
|
|
|
|
def notification(**params)
|
|
WebPush::Notification.new(**params, badge: user.memberships.unread.count, endpoint: endpoint, p256dh_key: p256dh_key, auth_key: auth_key)
|
|
end
|
|
end
|