Method Client.Send(). Add param ctx.
This commit is contained in:
parent
7033f4b75f
commit
dc50052210
4
fcm.go
4
fcm.go
|
@ -362,7 +362,7 @@ func (c *Client) doSendEachInBatch(
|
||||||
if validateOnly {
|
if validateOnly {
|
||||||
resp, err = c.Validate(m)
|
resp, err = c.Validate(m)
|
||||||
} else {
|
} else {
|
||||||
resp, err = c.Send(m)
|
resp, err = c.Send(ctx, m)
|
||||||
}
|
}
|
||||||
if err == nil {
|
if err == nil {
|
||||||
responses[idx] = MessageSendResponse{
|
responses[idx] = MessageSendResponse{
|
||||||
|
@ -394,7 +394,7 @@ func (c *Client) doSendEachInBatch(
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Client) Send(message Message) (string, error) {
|
func (c *Client) Send(ctx context.Context, message Message) (string, error) {
|
||||||
sendRequest := SendRequest{
|
sendRequest := SendRequest{
|
||||||
ValidateOnly: false,
|
ValidateOnly: false,
|
||||||
Message: message,
|
Message: message,
|
||||||
|
|
Loading…
Reference in New Issue