wppconnect-team / wppconnect

WPPConnect is an open source project developed by the JavaScript community with the aim of exporting functions from WhatsApp Web to the node, which can be used to support the creation of any interaction, such as customer service, media sending, intelligence recognition based on phrases artificial and many other things, use your imagination
https://wppconnect.io
Other
1.9k stars 333 forks source link

Erro ao enviar imagem #402

Closed tadeubdev closed 3 years ago

tadeubdev commented 3 years ago

Description

Estou tendo erro ao enviar imagens pelo beta. Não importa se mando por path, link, base64, ou como arquivo... simplesmente não vai.

Environment

Steps to Reproduce

client.sendImage(numero, url, filename, caption);
client.sendFile(numero, url, filename, caption);
client.sendFileFromBase64(numero, fileData, filename, caption);

Log Output

{
  me: {
    id: '-',
    platform: '-',
    smbTos: 0,
    pushname: '-',
    stale: false,
    blockStoreAdds: false,
    isVoipInitialized: false
  },
  to: {
    fromMe: true,
    remote: {
      server: 'c.us',
      user: '-',
      _serialized: '-@c.us'
    },
    id: '-',
    _serialized: 'true_-@c.us_-',
    formattedName: '-',
    isBusiness: false,
    isMyContact: true,
    pushname: '-'
  },
  erro: true,
  text: null,
  status: 'ERROR_UNKNOWN',
  type: 'sendImage',
  filename: '1628258415641-1628258417.png',
  mimeType: 'image/png'
}
tadeubdev commented 3 years ago

Resolvi aqui... O problema é que estava passando o caption como null, passei '' e foi.