X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/33aa709aa4e59e05ada6940a1c055f5e5646a418..add3cf6416e33c24331fd1e90e99284f44d2aae2:/whatsapp_send.go diff --git a/whatsapp_send.go b/whatsapp_send.go index ce3f70b..d5995df 100644 --- a/whatsapp_send.go +++ b/whatsapp_send.go @@ -16,8 +16,8 @@ import ( ) const ( - // whatsappSendTime is the longest time of a send. - whatsappSendTime = 30 * time.Second + // whatsappSendTimeout is the longest time of a send. + whatsappSendTimeout = 30 * time.Second // whatsappSendBytes is the most bytes of the text of a send. whatsappSendBytes = 65536 @@ -77,7 +77,7 @@ func whatsappSend(ctx context.Context, link WhatsAppLink, groups *WhatsAppGroups return "", err } - sendCtx, cancel := context.WithTimeout(ctx, whatsappSendTime) + sendCtx, cancel := context.WithTimeout(ctx, whatsappSendTimeout) defer cancel() response, err := link.client.SendMessage(sendCtx, jid, &waE2E.Message{