summaryrefslogtreecommitdiffstats
path: root/vendor/go.mau.fi/whatsmeow/download.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/go.mau.fi/whatsmeow/download.go')
-rw-r--r--vendor/go.mau.fi/whatsmeow/download.go14
1 files changed, 8 insertions, 6 deletions
diff --git a/vendor/go.mau.fi/whatsmeow/download.go b/vendor/go.mau.fi/whatsmeow/download.go
index e9b8d4f1..77b392a5 100644
--- a/vendor/go.mau.fi/whatsmeow/download.go
+++ b/vendor/go.mau.fi/whatsmeow/download.go
@@ -151,9 +151,10 @@ func getSize(msg DownloadableMessage) int {
// DownloadThumbnail downloads a thumbnail from a message.
//
// This is primarily intended for downloading link preview thumbnails, which are in ExtendedTextMessage:
-// var msg *waProto.Message
-// ...
-// thumbnailImageBytes, err := cli.DownloadThumbnail(msg.GetExtendedTextMessage())
+//
+// var msg *waProto.Message
+// ...
+// thumbnailImageBytes, err := cli.DownloadThumbnail(msg.GetExtendedTextMessage())
func (cli *Client) DownloadThumbnail(msg DownloadableThumbnail) ([]byte, error) {
mediaType, ok := classToThumbnailMediaType[msg.ProtoReflect().Descriptor().Name()]
if !ok {
@@ -173,9 +174,10 @@ func GetMediaType(msg DownloadableMessage) MediaType {
// Download downloads the attachment from the given protobuf message.
//
// The attachment is a specific part of a Message protobuf struct, not the message itself, e.g.
-// var msg *waProto.Message
-// ...
-// imageData, err := cli.Download(msg.GetImageMessage())
+//
+// var msg *waProto.Message
+// ...
+// imageData, err := cli.Download(msg.GetImageMessage())
//
// You can also use DownloadAny to download the first non-nil sub-message.
func (cli *Client) Download(msg DownloadableMessage) ([]byte, error) {