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

Downloading Stickers #2794

Open
danielvieira43 opened this issue Aug 3, 2024 · 2 comments
Open

Downloading Stickers #2794

danielvieira43 opened this issue Aug 3, 2024 · 2 comments
Labels
needs triage Needs avaliation question Further information is requested

Comments

@danielvieira43
Copy link

I'm calling the function client.decryptFile(message); when a sticker is received but it's not working. Is there any trick to download stickers? I'm running decryptFile normaly for image, audio, documents without problems.

Thanks!

@danielvieira43 danielvieira43 added needs triage Needs avaliation question Further information is requested labels Aug 3, 2024
@ghayman
Copy link
Collaborator

ghayman commented Aug 7, 2024

Seems to work OK for me... do you have any browser console or server errors?

Here's code fragment we use

    switch (message.type) {
        case 'video':
        case 'image':
        case 'ptt':
        case 'document':
        case 'sticker':
            message['text'] = message['caption']
            try {
                const buffer = await client.decryptFile(message);
                message['data'] = buffer.toString('base64');
            } catch (e) {
                log.warn("  ProcessMessage download failed: " + message.id);
            }
            break;

@danielvieira43
Copy link
Author

The problem is happening when the user send by whatsapp web. If the user try to send using whatsapp mobile app it works fine!

Error:

AxiosError {hostname: 'web.whatsapp.net', syscall: 'getaddrinfo', code: 'ENOTFOUND', errno: -3008, message: 'getaddrinfo ENOTFOUND web.whatsapp.net', …}
whatsapp.js:191
Error trying to download the file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Needs avaliation question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants