File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -12,10 +12,11 @@ class FCM
12
12
INSTANCE_ID_API = "https://iid.googleapis.com"
13
13
TOPIC_REGEX = /[a-zA-Z0-9\- _.~%]+/
14
14
15
- def initialize ( json_key_path = "" , project_name = "" , http_options = { } )
15
+ def initialize ( json_key_path = "" , project_name = "" , http_options = { } , faraday_configurer = nil )
16
16
@json_key_path = json_key_path
17
17
@project_name = project_name
18
18
@http_options = http_options
19
+ @faraday_configurer = faraday_configurer
19
20
end
20
21
21
22
# See https://firebase.google.com/docs/cloud-messaging/send-message
@@ -202,6 +203,7 @@ def for_uri(uri, extra_headers = {})
202
203
extra_headers . each do |key , value |
203
204
faraday . headers [ key ] = value
204
205
end
206
+ @faraday_configurer . call ( faraday ) if @faraday_configurer
205
207
end
206
208
yield connection
207
209
end
You can’t perform that action at this time.
0 commit comments