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

fix: Message.getInfo #2574

Merged
merged 15 commits into from
Nov 24, 2023
Merged

fix: Message.getInfo #2574

merged 15 commits into from
Nov 24, 2023

Conversation

alechkos
Copy link
Collaborator

@alechkos alechkos commented Oct 10, 2023

Table of Contents

- Description

- Related Issues

- I Want to Test this PR

- I Got an Error While Testing This PR ❌

- How Has the PR Been Tested (latest test on 29.10.2023)

- Types of Changes


Description

In latest versions wa refactored sendQueryMsgInfo method which caused an issue, the PR fixes that issue.


Related Issues

PR fixes #2567 fixes #2575


To test this PR by yourself you can run one of the following commands:

  • NPM
npm install github:alechkos/whatsapp-web.js#fix-getInfo
  • YARN
yarn add github:alechkos/whatsapp-web.js#fix-getInfo

If you encounter any errors while testing this PR, please provide in a comment:

  1. The code you've used without any sensitive information (use syntax highlighting for more readability)
  2. The error you got
  3. The library version
  4. The WWeb version: console.log(await client.getWWebVersion());
  5. The browser (Chrome/Chromium)

Important

You have to reapply the PR each time it is changed (new commits were pushed since your last application)


How Has The PR Been Tested (latest test on 29.10.2023)

Was tested with a code below:

client.on('message_create', async (message) => {
    console.log(await (await client.sendMessage(message.to, 'TEST')).getInfo());
});

The response after the message was read by one participant:

{
  delivery: [],
  deliveryRemaining: 1,
  played: [],
  playedRemaining: 2,
  read: [
    {
      id: [
        {
          server: 'c.us',
          user: 'XXXXXXXXXX',
          _serialized: 'XXXXXXXXXX@c.us'
        }
      ],
      t: 169XXXXXXX
    }
  ],
  readRemaining: 1
}

Tested On:

Types of accounts:

  • Personal
  • Buisness

Environment:

  • Android 10
  • Windows 10:
    • WWebJS v1.23.1-alpha.0
    • WWeb v2.2346.52, v2.2347.56
    • Puppeteer v18.2.1
    • Node v18.17.1
    • Chrome v117.0.5938.150

Types of Changes

  • Dependency change
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix/feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project
  • I have updated the usage example accordingly (example.js)
  • I have updated the documentation accordingly (index.d.ts)

Sorry, something went wrong.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Copy link

@CSFelix CSFelix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested it locally and worked!!

@N0N4M3BNS
Copy link

N0N4M3BNS commented Oct 17, 2023

If using WWeb version 2.2344.53 not work. Can check it?

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@alechkos
Copy link
Collaborator Author

@N0N4M3BNS

If using WWeb version 2.2344.53 not work

It worked on wweb v2.2344.53 also, but we had to wait for the message data to be updated
Fixed

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Copy link

@N0N4M3BNS N0N4M3BNS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok working now.

@alechkos alechkos marked this pull request as draft October 20, 2023 19:12
@alechkos alechkos marked this pull request as ready for review October 20, 2023 23:13
@alechkos alechkos requested a review from tuyuribr October 21, 2023 16:18
Copy link
Collaborator

@tuyuribr tuyuribr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work

@alechkos
Copy link
Collaborator Author

@tuyuribr

Good work

Thank you :)

@alechkos alechkos changed the title fix: Message.getInfo() fix: Message.getInfo Oct 21, 2023
@wilsinho8
Copy link

Im testing and i got this error:

image

Copy link
Collaborator

@shirser121 shirser121 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@shirser121 shirser121 merged commit 7ff9c98 into pedroslopez:main Nov 24, 2023
idoenk added a commit to idoenk/whatsapp-web.js that referenced this pull request Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants