Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant send images with caption #3168

Closed
1 task done
danielnery46 opened this issue Jan 26, 2024 · 2 comments
Closed
1 task done

Cant send images with caption #3168

danielnery46 opened this issue Jan 26, 2024 · 2 comments

Comments

@danielnery46
Copy link

Are you using the latest version of the library?

  • I have checked and am using the latest version of the library.

What type of session are you experiencing this issue on?

Legacy (Normal)

What type of host account are you experiencing this issue on?

Personal account (normal)

Mode

EASY API/CLI

Current Behavior

Using the command sendImage, even if it has a caption, the image sent to WhatsApp is always without a caption

Expected Behavior

No response

Steps To Reproduce

  1. execute bot
  2. use sendImage
  3. get the result

create() code OR full CLI command + CONFIG

def enviar_para_whatsapp(content, caption=None, image_url=None):
    to = f'{GRUPO_WHATSAPP_DESTINO}'
    try:
        if image_url:
            # Se for uma imagem, envie
            normalized_caption = unidecode.unidecode(caption) if caption else None
            whatsapp_client.sendImage(to, image_url, 'photo.jpg', caption=normalized_caption)
        else:
            # Se for apenas texto, envie
            whatsapp_client.sendText(to, content)
    except Exception as e:
        logging.error(f"Erro ao enviar mensagem para o WhatsApp: {e}", exc_info=True)

DEBUG INFO

{
  "WA_VERSION": "2.2404.2",
  "WA_AUTOMATE_VERSION": "4.67.0",
  "BROWSER_VERSION": "HeadlessChrome/112.0.5614.0",
  "START_TS": 1706277295741,
  "RAM_INFO": "Total: 8.28 GB | Free: 1.44 GB",
  "PPTR_VERSION": "19.11.1",
  "LATEST_VERSION": true,
  "CLI": true
}

Environment

- OS: Windows 11
- Node: 21.6.1
- npm: 10.4.0

Screenshots/Logs

image

Anything else?

No response

@smashah
Copy link
Member

smashah commented Feb 19, 2024

i cannot replicate this issue, is it still a problem?

@smashah
Copy link
Member

smashah commented Feb 19, 2024

Closing. if it happens again please bump and i will reopen

@smashah smashah closed this as completed Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants