add notification sound payload
This commit is contained in:
parent
9970b02567
commit
0872ce961d
2
model.go
2
model.go
|
@ -16,6 +16,7 @@ type PushRequest struct {
|
|||
Users []string `json:"users"`
|
||||
Label string `json:"label,omitempty"`
|
||||
Category string `json:"category,omitempty"`
|
||||
Sound string `json:"sound,omitempty"`
|
||||
}
|
||||
|
||||
// PushResponse ...
|
||||
|
@ -33,6 +34,7 @@ type pushRequest struct {
|
|||
Topic string `json:"topic"`
|
||||
Label string `json:"label"`
|
||||
Category string `json:"category"`
|
||||
Sound string `json:"sound,omitempty"`
|
||||
}
|
||||
|
||||
// Query ...
|
||||
|
|
|
@ -61,6 +61,7 @@ func (c *Client) PushToUsers(payload PushRequest) (requestID string, err error)
|
|||
Users: payload.Users,
|
||||
Label: payload.Label,
|
||||
Category: payload.Category,
|
||||
Sound: payload.Sound,
|
||||
}
|
||||
msg, err := c.natsServer.Request(SubjectPushNotification, toBytes(p))
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue