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

Cannot open the chat with openChatAt() #2293

Closed
gekkedev opened this issue Jul 28, 2024 · 0 comments
Closed

Cannot open the chat with openChatAt() #2293

gekkedev opened this issue Jul 28, 2024 · 0 comments
Labels
bug Something isn't working needs triage

Comments

@gekkedev
Copy link
Contributor

gekkedev commented Jul 28, 2024

Description

Cannot open the chat when using openChatAt(), but openChat() works.

Environment

  • WPPConnect version(s): 1.32.4
  • WA-JS version(s): 3.6.0
  • Browser: Chrome @latest
  • OS: Windows 11
  • Node version: Node 18
  • WhatsApp version: 2.3000.10147x
  • MultiDevice (BETA): no?

Steps to Reproduce

  1. Receive a message
  2. Try to open the chat at this exact message

Log Output

Error: messageId is not defined

but the 2nd parameter is something like false_987654321098765432@g.us_ABCDEF1234567890_0987654321098@c.us

Your Code

client.onMessage(async message => 
  await client.openChatAt(message.chatId._serialized, message.id)
}

this approach works, but won't necessarily scroll to the right message:

client.onMessage(async message => 
  await client.openChat(message.chatId._serialized)
}

Additional context / Screenshot

Maybe we can add support for the 1st param being a message object (2nd one would become optional) so that the method extracts all the data that it needs from the message.

@gekkedev gekkedev added bug Something isn't working needs triage labels Jul 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

No branches or pull requests

1 participant