Sending a large thumbnail URL in channel messages #498
-
I am sending an ExtendedTextMessage containing a link to a channel (newsletter) with the following properties:
The received message on the channel has a small thumbnail preview.
I saved the thumbnail file from the message with a large preview, and it is a rather very small JPEG (100x48). I suspect there's a missing larger image file that's being sent with the message and not showing after parsing. Maybe we should attach a larger image that I'm not aware of? Appreciate any help :) Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 5 replies
-
have you tried using cli.Upload for thumbnail? resp, err := cli.UploadNewsletter(context.Background(), yourthumb, whatsmeow.whatsmeow.MediaLinkThumbnail)
ext := &waProto.ExtendedTextMessage{
...
ThumbnailDirectPath: &resp.DirectPath,
ThumbnailSha256: resp.FileSHA256,
ThumbnailEncSha256: resp.FileEncSHA256,
} |
Beta Was this translation helpful? Give feedback.
-
@arugaz thanks for your swift answer. You can send from your phone a link on a channel, and you'll see the large preview. Printing out the message to the console doesn't show any difference. I tried using debugging mode, but the message contents are hard to parse as they're binary or encrypted? Could it be a new field in the protobuf schema that isn't added? Thanks.
|
Beta Was this translation helpful? Give feedback.
-
@arugaz I tried your code, and it gives the same result (small image thumb). I do notice one thing that might be helpful. I sent the link from my phone, and I save the JPEG thumbnail received via whatsmeow. It is very tiny 100x48. The 800x384 image is nowhere to be found in the received message on whatsmeow. Although the fields ThumbnailWidth and ThumbnailHeight are equal to 800 and 384. |
Beta Was this translation helpful? Give feedback.
-
theres other func for upload media to channel Lines 124 to 130 in 9eb4197 |
Beta Was this translation helpful? Give feedback.
theres other func for upload media to channel
whatsmeow/upload.go
Lines 124 to 130 in 9eb4197