whatsapp-web.js
whatsapp-web.js copied to clipboard
Custom caption overriding to filename
Is there an existing issue for this?
- [ ] I have searched the existing issues
Describe the bug
When I send a document with a custom caption, the caption changes to the document file name.
Expected behavior
I need to have the given caption instead of the filename as a caption.
Steps to Reproduce the Bug or Issue
- set sendMediaAsDocument = true;
- set caption = 'testing'; //anything
- send the message (video/mp4)
Relevant Code
const options: WAWebJS.MessageSendOptions= {}; options.sendMediaAsDocument = true; options.caption = caption; message.reply(media, undefined, options);
Browser Type
Google Chrome
WhatsApp Account Type
Standard
Does your WhatsApp account have multidevice enabled?
Yes, I am using Multi Device
Environment
OS: Windows and Linux Phone OS: iOS whatsapp-web.js version 1.19.5 WhatsApp Web version latest
Additional context
No response
#1849
#1849
It looks like not merged into the main branch till now, when can we expect that..?
same problem here..
same problem
I read all the others issues about that.
In my understanding "caption" is to be used as the caption itself that goes in the message along with the file. The value used for what would be "file name" must be informed when the file is created. I believe that the API is not intended to overwrite the filename, and this is the responsibility of the developer who creates the file. The API to rename the file through some sort of functionality... would be a plus. I don't believe this thread should be opened as an issue.