Method Client.Validate(). Add param ctx.

This commit is contained in:
Владислав Весельский 2025-01-25 11:02:37 +03:00
parent dc50052210
commit 61047cba6a
1 changed files with 2 additions and 2 deletions

4
fcm.go
View File

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