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 resp string
|
||||||
var err error
|
var err error
|
||||||
if validateOnly {
|
if validateOnly {
|
||||||
resp, err = c.Validate(m)
|
resp, err = c.Validate(ctx, m)
|
||||||
} else {
|
} else {
|
||||||
resp, err = c.Send(ctx, m)
|
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
|
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{
|
sendRequest := SendRequest{
|
||||||
ValidateOnly: true,
|
ValidateOnly: true,
|
||||||
Message: message,
|
Message: message,
|
||||||
|
|
Loading…
Reference in New Issue