Method Client.Validate(). Add param ctx.
This commit is contained in:
parent
dc50052210
commit
61047cba6a
4
fcm.go
4
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,
|
||||
|
|
Loading…
Reference in New Issue