File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -554,7 +554,7 @@ type WebpushConfig struct {
554
554
Headers map [string ]string `json:"headers,omitempty"`
555
555
Data map [string ]string `json:"data,omitempty"`
556
556
Notification * WebpushNotification `json:"notification,omitempty"`
557
- FcmOptions * WebpushFcmOptions `json:"fcm_options,omitempty"`
557
+ FCMOptions * WebpushFCMOptions `json:"fcm_options,omitempty"`
558
558
}
559
559
560
560
// WebpushNotificationAction represents an action that can be performed upon receiving a WebPush notification.
@@ -660,8 +660,8 @@ func (n *WebpushNotification) UnmarshalJSON(b []byte) error {
660
660
return nil
661
661
}
662
662
663
- // WebpushFcmOptions contains additional options for features provided by the FCM web SDK.
664
- type WebpushFcmOptions struct {
663
+ // WebpushFCMOptions contains additional options for features provided by the FCM web SDK.
664
+ type WebpushFCMOptions struct {
665
665
Link string `json:"link,omitempty"`
666
666
}
667
667
Original file line number Diff line number Diff line change @@ -311,7 +311,7 @@ var validMessages = []struct {
311
311
Vibrate : []int {100 , 200 , 100 },
312
312
CustomData : map [string ]interface {}{"k1" : "v1" , "k2" : "v2" },
313
313
},
314
- FcmOptions : & WebpushFcmOptions {
314
+ FCMOptions : & WebpushFCMOptions {
315
315
Link : "https://link.com" ,
316
316
},
317
317
},
@@ -959,7 +959,7 @@ var invalidMessages = []struct {
959
959
req : & Message {
960
960
Webpush : & WebpushConfig {
961
961
Notification : & WebpushNotification {},
962
- FcmOptions : & WebpushFcmOptions {
962
+ FCMOptions : & WebpushFCMOptions {
963
963
Link : "link" ,
964
964
},
965
965
},
@@ -972,7 +972,7 @@ var invalidMessages = []struct {
972
972
req : & Message {
973
973
Webpush : & WebpushConfig {
974
974
Notification : & WebpushNotification {},
975
- FcmOptions : & WebpushFcmOptions {
975
+ FCMOptions : & WebpushFCMOptions {
976
976
Link : "http://link.com" ,
977
977
},
978
978
},
Original file line number Diff line number Diff line change @@ -222,8 +222,8 @@ func validateWebpushConfig(webpush *WebpushConfig) error {
222
222
return fmt .Errorf ("multiple specifications for the key %q" , k )
223
223
}
224
224
}
225
- if webpush .FcmOptions != nil {
226
- link := webpush .FcmOptions .Link
225
+ if webpush .FCMOptions != nil {
226
+ link := webpush .FCMOptions .Link
227
227
p , err := url .ParseRequestURI (link )
228
228
if err != nil {
229
229
return fmt .Errorf ("invalid link URL: %q" , link )
You can’t perform that action at this time.
0 commit comments