whatsapp-web.js icon indicating copy to clipboard operation
whatsapp-web.js copied to clipboard

Custom caption overriding to filename

Open urstrulycherry opened this issue 1 year ago • 4 comments

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.

image

image

Expected behavior

I need to have the given caption instead of the filename as a caption.

Steps to Reproduce the Bug or Issue

  1. set sendMediaAsDocument = true;
  2. set caption = 'testing'; //anything
  3. 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

urstrulycherry avatar Mar 24 '23 14:03 urstrulycherry

#1849

KJoaquin avatar Mar 27 '23 14:03 KJoaquin

#1849

It looks like not merged into the main branch till now, when can we expect that..?

urstrulycherry avatar Mar 27 '23 14:03 urstrulycherry

same problem here..

Luskan777 avatar Mar 31 '23 03:03 Luskan777

same problem

thisaakash avatar May 07 '23 10:05 thisaakash

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.

msscsh avatar May 24 '23 22:05 msscsh