diff --git a/fcm.go b/fcm.go index e899086..56d4c53 100644 --- a/fcm.go +++ b/fcm.go @@ -360,7 +360,7 @@ func (c *Client) doSendEachInBatch( var resp string var err error if validateOnly { - resp, err = c.Validate(m) + resp, err = c.Validate(ctx, m) } else { resp, err = c.Send(ctx, m) } @@ -404,7 +404,7 @@ func (c *Client) Send(ctx context.Context, message Message) (string, error) { return resp.MessageName, err } -func (c *Client) Validate(message Message) (string, error) { +func (c *Client) Validate(ctx context.Context, message Message) (string, error) { sendRequest := SendRequest{ ValidateOnly: true, Message: message,