Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Unreleased

- [added] `messaging.AndroidNotification`type now supports channel_id.
- [dropped] Dropped support for Go 1.8 and earlier.
- [fixed] Fixing error handling in FCM. The SDK now checks the key
`type.googleapis.com/google.firebase.fcm.v1.FcmError` to set error code.
Expand Down
1 change: 1 addition & 0 deletions messaging/messaging.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ type AndroidNotification struct {
BodyLocArgs []string `json:"body_loc_args,omitempty"`
TitleLocKey string `json:"title_loc_key,omitempty"`
TitleLocArgs []string `json:"title_loc_args,omitempty"`
ChannelID string `json:"channel_id,omitempty"`
}

// WebpushConfig contains messaging options specific to the WebPush protocol.
Expand Down
2 changes: 2 additions & 0 deletions messaging/messaging_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ var validMessages = []struct {
TitleLocArgs: []string{"t1", "t2"},
BodyLocKey: "blk",
BodyLocArgs: []string{"b1", "b2"},
ChannelID: "channel",
},
TTL: &ttlWithNanos,
},
Expand All @@ -165,6 +166,7 @@ var validMessages = []struct {
"title_loc_args": []interface{}{"t1", "t2"},
"body_loc_key": "blk",
"body_loc_args": []interface{}{"b1", "b2"},
"channel_id": "channel",
},
"ttl": "1.500000000s",
},
Expand Down