FIX: regenerate vapid keys when the public key bytes is blank
This commit is contained in:
parent
9738025bb2
commit
2002a7c4ef
|
@ -1,6 +1,6 @@
|
|||
require_dependency 'webpush'
|
||||
|
||||
if SiteSetting.vapid_public_key.blank? || SiteSetting.vapid_private_key.blank?
|
||||
if SiteSetting.vapid_public_key.blank? || SiteSetting.vapid_private_key.blank? || SiteSetting.vapid_public_key_bytes.blank?
|
||||
vapid_key = Webpush.generate_key
|
||||
SiteSetting.vapid_public_key = vapid_key.public_key
|
||||
SiteSetting.vapid_private_key = vapid_key.private_key
|
||||
|
|
Loading…
Reference in New Issue