Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add fcm endpoints #76

Merged
merged 1 commit into from
Jun 6, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/webpush/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
module Webpush
# It is temporary URL until supported by the GCM server.
GCM_URL = 'https://android.googleapis.com/gcm/send'.freeze
TEMP_GCM_URL = 'https://gcm-http.googleapis.com/gcm'.freeze
TEMP_GCM_URL = 'https://fcm.googleapis.com/fcm/'.freeze

# rubocop:disable Metrics/ClassLength
class Request
Expand Down Expand Up @@ -155,7 +155,7 @@ def api_key
end

def api_key?
!(api_key.nil? || api_key.empty?) && @endpoint =~ %r{\Ahttps://(android|gcm-http)\.googleapis\.com}
!(api_key.nil? || api_key.empty?) && @endpoint =~ %r{\Ahttps://(android|gcm-http|fcm)\.googleapis\.com}
end

def vapid?
Expand Down