FIX: regenerate vapid keys when the public key bytes is blank

This commit is contained in:
Jeff Wong 2018-05-07 17:00:40 -07:00
parent 9738025bb2
commit 2002a7c4ef
1 changed files with 1 additions and 1 deletions

View File

@ -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