Skip to content

fix(chats): update abprops query to fix bad-request error#2473

Merged
purpshell merged 1 commit intomasterfrom
fix/abprops-abt-fetch
Apr 24, 2026
Merged

fix(chats): update abprops query to fix bad-request error#2473
purpshell merged 1 commit intomasterfrom
fix/abprops-abt-fetch

Conversation

@vinikjkkj
Copy link
Copy Markdown
Collaborator

@vinikjkkj vinikjkkj commented Apr 9, 2026

Summary by CodeRabbit

  • Chores
    • Updated property synchronization protocol and hash attribute handling to use revised configuration methods.

@whiskeysockets-bot
Copy link
Copy Markdown
Contributor

Thanks for opening this pull request and contributing to the project!

The next step is for the maintainers to review your changes. If everything looks good, it will be approved and merged into the main branch.

In the meantime, anyone in the community is encouraged to test this pull request and provide feedback.

✅ How to confirm it works

If you’ve tested this PR, please comment below with:

Tested and working ✅

This helps us speed up the review and merge process.

📦 To test this PR locally:

# NPM
npm install @whiskeysockets/baileys@WhiskeySockets/Baileys#fix/abprops-abt-fetch

# Yarn (v2+)
yarn add @whiskeysockets/baileys@WhiskeySockets/Baileys#fix/abprops-abt-fetch

# PNPM
pnpm add @whiskeysockets/baileys@WhiskeySockets/Baileys#fix/abprops-abt-fetch

If you encounter any issues or have feedback, feel free to comment as well.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 9, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6def0c76-4ed0-43f0-aa5b-37dd1f3ca4a1

📥 Commits

Reviewing files that changed from the base of the PR and between 8e5093c and 01047de.

📒 Files selected for processing (1)
  • src/Socket/chats.ts

📝 Walkthrough

Walkthrough

Updated the fetchProps function in the chats module to request AB (A/B test) properties instead of standard properties. Changed the IQ query namespace, protocol version, and modified hash attribute handling to be conditional based on credential state.

Changes

Cohort / File(s) Summary
Props Fetching Configuration
src/Socket/chats.ts
Modified fetchProps to request AB props: switched IQ namespace from 'w' to 'abt', downgraded protocol from '2' to '1', and made hash attribute conditional (included only when lastPropHash exists rather than defaulting to empty string).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 From standard props to AB we hop,
The namespace shifts, the protocol drops,
Hash now conditional, trimmed just right,
Testing variants in digital flight! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: updating the abprops query to fix a bad-request error in the chats module.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/abprops-abt-fetch

Comment @coderabbitai help to get the list of available commands and usage tips.

@purpshell purpshell merged commit 3451ade into master Apr 24, 2026
5 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Baileys Review Cycle Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants