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

why chat.fetchMessages only return one message of e2e_notification #2475

Closed
1 task done
NightRannie opened this issue Sep 6, 2023 · 2 comments
Closed
1 task done
Labels
bug Something isn't working

Comments

@NightRannie
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

the question happen to my whatsapp account From Android to IOS ,scan qrcode to login success, used chat.fetchMessages only get one message of e2e_notification, how to get all message
微信截图_20230906114950
微信截图_20230906115158

Expected behavior

get all message list

Steps to Reproduce the Bug or Issue

1 client.initialize
2 scan code
3 chat.fetchMessages

Relevant Code

const { clientId, options } = data
const chat = await this.getChatById(options.chatId, clientId)
const messages = await chat.fetchMessages({
limit: options.limit, // is 999
fromMe: false
}) || []

logger.info(messages, 'messages----')

Browser Type

Google Chrome

WhatsApp Account Type

Standard

Does your WhatsApp account have multidevice enabled?

Yes, I am using Multi Device

Environment

OS:electron vue for Window
Phone OS: iOS
whatsapp-web.js version:1.22.1
WhatsApp Web version [run await client.getWWebVersion()]:
Node.js Version:16.17.0

Additional context

No response

@NightRannie NightRannie added the bug Something isn't working label Sep 6, 2023
@scrawner
Copy link

same issue here...
Im trying to get unread messages using fetchMessages

When I run this script right after client.onready it works, but whenever I run the script in any other moment it's not working.

@alechkos
Copy link
Collaborator

alechkos commented Dec 2, 2023

Duplicate of #1325

@alechkos alechkos marked this as a duplicate of #1325 Dec 2, 2023
@alechkos alechkos closed this as not planned Won't fix, can't repro, duplicate, stale Dec 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants