Skip to content

Commit

Permalink
int to int64 for 32-bit supp. cascading priority
Browse files Browse the repository at this point in the history
  • Loading branch information
NaySoftware committed Feb 5, 2017
1 parent 7304a4e commit 8b8dc58
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions fcm.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ type FcmMsg struct {
type FcmResponseStatus struct {
Ok bool
StatusCode int
MulticastId int `json:"multicast_id"`
MulticastId int64 `json:"multicast_id"`
Success int `json:"success"`
Fail int `json:"failure"`
Canonical_ids int `json:"canonical_ids"`
Results []map[string]string `json:"results,omitempty"`
MsgId int `json:"message_id,omitempty"`
MsgId int64 `json:"message_id,omitempty"`
Err string `json:"error,omitempty"`
RetryAfter string
}
Expand Down Expand Up @@ -220,13 +220,15 @@ func (this *FcmResponseStatus) parseStatusBody(body []byte) error {

// SetPriority Sets the priority of the message.
// Priority_HIGH or Priority_NORMAL
func (this *FcmClient) SetPriority(p string) {
func (this *FcmClient) SetPriority(p string) *FcmClient {

if p == Priority_HIGH {
this.Message.Priority = Priority_HIGH
} else {
this.Message.Priority = Priority_NORMAL
}

return this
}

// SetCollapseKey This parameter identifies a group of messages
Expand Down

0 comments on commit 8b8dc58

Please sign in to comment.