]> git.giacomolli.uk - onechat/blobdiff - whatsapp_send.go
Show stored images to the user
[onechat] / whatsapp_send.go
index ce3f70b997d41a2e0fd55562a40634f8dfad94c6..d5995df4a0eb0996787c3443f4d2d3414393bcd7 100644 (file)
@@ -16,8 +16,8 @@ import (
 )
 
 const (
 )
 
 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
 
        // 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
        }
 
                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{
        defer cancel()
 
        response, err := link.client.SendMessage(sendCtx, jid, &waE2E.Message{