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

Click here to get older messages from your phone #2937

Open
1 task done
momokang opened this issue Apr 10, 2024 · 0 comments
Open
1 task done

Click here to get older messages from your phone #2937

momokang opened this issue Apr 10, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@momokang
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

image

If from web WhatsApp, user can click the button on top of the chat and start loading the older messages from phone until like 3 months ago.

Do we have the option in this library to load older messages?

There is a similar issue which mark as completed #2478
Chat.fetchMessages Is not working at all even I set limit to 999, the chat is only 10 messages only and I can't do anything on it.

Expected behavior

Able to load the messages by clicking the button

Steps to Reproduce the Bug or Issue

  1. Open a chat
  2. Scroll up
  3. Click older message

Relevant Code

waClient.getChatById(req.query.from)
.then(async function (chat) {
await chat.fetchMessages({
limit: 999,
})
.then(async function (allMsg) {
console.log(allMsg.length); // I only get 10 messages and there are a lot more message which is only 1 week ago is not showing
});
});

Browser Type

Google Chrome

WhatsApp Account Type

WhatsApp Business

Does your WhatsApp account have multidevice enabled?

Yes, I am using Multi Device

Environment

OS: Windows
Phone OS: Android
whatsapp-web.js version 1.23.1-alpha.3
WhatsApp Web version [run await client.getWWebVersion()]:
Node.js Version 20.11

Additional context

No response

@momokang momokang added the bug Something isn't working label Apr 10, 2024
@alechkos alechkos added enhancement New feature or request and removed bug Something isn't working labels Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants