summaryrefslogtreecommitdiffstats
path: root/vendor/go.mau.fi/whatsmeow/upload.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2022-11-27 00:42:16 +0100
committerGitHub <noreply@github.com>2022-11-27 00:42:16 +0100
commit4fd0a7672777f0ed15692ae2ba47838208537558 (patch)
treeb119834a8b9ee78aa8f1b2ad05efa7da50516cbf /vendor/go.mau.fi/whatsmeow/upload.go
parent6da9d567dc9195e9a5211f23a6795a41f56a1bfc (diff)
downloadmatterbridge-msglm-4fd0a7672777f0ed15692ae2ba47838208537558.tar.gz
matterbridge-msglm-4fd0a7672777f0ed15692ae2ba47838208537558.tar.bz2
matterbridge-msglm-4fd0a7672777f0ed15692ae2ba47838208537558.zip
Update dependencies (#1929)
Diffstat (limited to 'vendor/go.mau.fi/whatsmeow/upload.go')
-rw-r--r--vendor/go.mau.fi/whatsmeow/upload.go35
1 files changed, 18 insertions, 17 deletions
diff --git a/vendor/go.mau.fi/whatsmeow/upload.go b/vendor/go.mau.fi/whatsmeow/upload.go
index ef4d119a..4556077e 100644
--- a/vendor/go.mau.fi/whatsmeow/upload.go
+++ b/vendor/go.mau.fi/whatsmeow/upload.go
@@ -38,25 +38,26 @@ type UploadResponse struct {
// You should copy the fields in the response to the corresponding fields in a protobuf message.
//
// For example, to send an image:
-// resp, err := cli.Upload(context.Background(), yourImageBytes, whatsmeow.MediaImage)
-// // handle error
//
-// imageMsg := &waProto.ImageMessage{
-// Caption: proto.String("Hello, world!"),
-// Mimetype: proto.String("image/png"), // replace this with the actual mime type
-// // you can also optionally add other fields like ContextInfo and JpegThumbnail here
+// resp, err := cli.Upload(context.Background(), yourImageBytes, whatsmeow.MediaImage)
+// // handle error
//
-// Url: &resp.URL,
-// DirectPath: &resp.DirectPath,
-// MediaKey: resp.MediaKey,
-// FileEncSha256: resp.FileEncSHA256,
-// FileSha256: resp.FileSha256,
-// FileLength: &resp.FileLength,
-// }
-// _, err = cli.SendMessage(context.Background(), targetJID, "", &waProto.Message{
-// ImageMessage: imageMsg,
-// })
-// // handle error again
+// imageMsg := &waProto.ImageMessage{
+// Caption: proto.String("Hello, world!"),
+// Mimetype: proto.String("image/png"), // replace this with the actual mime type
+// // you can also optionally add other fields like ContextInfo and JpegThumbnail here
+//
+// Url: &resp.URL,
+// DirectPath: &resp.DirectPath,
+// MediaKey: resp.MediaKey,
+// FileEncSha256: resp.FileEncSHA256,
+// FileSha256: resp.FileSha256,
+// FileLength: &resp.FileLength,
+// }
+// _, err = cli.SendMessage(context.Background(), targetJID, "", &waProto.Message{
+// ImageMessage: imageMsg,
+// })
+// // handle error again
//
// The same applies to the other message types like DocumentMessage, just replace the struct type and Message field name.
func (cli *Client) Upload(ctx context.Context, plaintext []byte, appInfo MediaType) (resp UploadResponse, err error) {