Method Client.Send(). Add param ctx.

This commit is contained in:
Владислав Весельский 2025-01-25 10:59:28 +03:00
parent 7033f4b75f
commit dc50052210
1 changed files with 2 additions and 2 deletions

4
fcm.go
View File

@ -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,