release: develop → master 2026-06-06 (#503 + #506 + #507)#508
Conversation
…Sockets#2620 port) (#503) fix(newsletter): parse metadata and fetch-messages responses (WhiskeySockets#2620 port) (#503)
…rt PR WhiskeySockets#2605) (#506) fix(contacts): resolve LID↔PN for profile-picture contacts.update (port PR WhiskeySockets#2605) (#506)
|
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 worksIf you’ve tested this PR, please comment below with: This helps us speed up the review and merge process. 📦 To test this PR locally:If you encounter any issues or have feedback, feel free to comment as well. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughExtends contact-picture identity resolution in socket handling, updates newsletter metadata/message parsing and fetch flow, and adds a new status.db schema with multi-db wiring and tests. ChangesContact Picture Identity Resolution
Newsletter Protocol Updates
Status Database Schema Integration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration. Warning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. Comment |
There was a problem hiding this comment.
Pull request overview
Promotes develop into master, bringing in three feature/fix batches for newsletters, contact picture updates (LID↔PN correlation), and Phase 9 multi-DB expansion with a new status.db schema.
Changes:
- Fix newsletter metadata parsing and implement a working newsletter message-fetch query + response parsing.
- Improve
contacts.updatefor profile-picture notifications by resolving and emitting both PN and LID when available. - Add Phase 9
status.db(14th SQLite file) and validate its core tables in the multi-db auth-state test.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Utils/multi-db-sqlite/use-multi-db-sqlite-auth-state.ts | Doc update to reflect 14 DB files and document status.db. |
| src/Utils/multi-db-sqlite/store.ts | Doc/comment updates for 14-handle setup and adjusted cache sizing math. |
| src/Utils/multi-db-sqlite/schemas/status.ts | New STATUS_SCHEMA defining core Status/channel-crosspost tables & indexes. |
| src/Utils/multi-db-sqlite/schemas/index.ts | Adds status.db to MULTI_DB_FILES and wires STATUS_SCHEMA into SCHEMAS. |
| src/Utils/index.ts | Re-exports the new contact-picture identity helper. |
| src/Utils/contact-picture-identity.ts | New helper to best-effort resolve LID↔PN identity for picture updates. |
| src/Types/Newsletter.ts | Removes duplicated NewsletterCreateResponse interface declaration. |
| src/Socket/newsletter.ts | Newsletter metadata parsing fix + new fetch-messages stanza and parsed return shape. |
| src/Socket/messages-recv.ts | Refactors picture notification handling; uses identity resolution for non-group updates. |
| src/tests/Utils/multi-db-sqlite-auth-state.test.ts | Updates expectations for 14 DB files; asserts status.db core tables exist. |
| src/tests/Utils/contact-picture-identity.test.ts | Adds unit tests covering LID↔PN resolution behavior and edge cases. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
4 issues found across 11 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/Utils/contact-picture-identity.ts (1)
28-28: 💤 Low valueOptional: Consider adding debug logging for resolution failures.
The
.catch(() => null)pattern is appropriate for best-effort resolution, but adding debug-level logging when resolution fails could help diagnose mapping issues during development.📊 Optional logging enhancement
- const resolvedPn = await ctx.getPNForLID(from).catch(() => null) + const resolvedPn = await ctx.getPNForLID(from).catch(err => { + logger?.debug?.({ lid: from, err: err?.message }, 'LID→PN resolution failed') + return null + })(Note: Would require adding optional
loggertoContactPictureIdentityContexttype.)Also applies to: 42-42
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/Utils/contact-picture-identity.ts` at line 28, Add optional debug logging around the best-effort PN resolution in contact-picture-identity.ts so failures are observable during development. In the logic that calls ctx.getPNForLID(from) and ctx.getPNForLID(to), keep the null fallback but log at debug level when the promise rejects, and wire in an optional logger on ContactPictureIdentityContext to make that possible without changing behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/Utils/contact-picture-identity.ts`:
- Line 28: Add optional debug logging around the best-effort PN resolution in
contact-picture-identity.ts so failures are observable during development. In
the logic that calls ctx.getPNForLID(from) and ctx.getPNForLID(to), keep the
null fallback but log at debug level when the promise rejects, and wire in an
optional logger on ContactPictureIdentityContext to make that possible without
changing behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 095bca1b-1a38-4274-9b53-4c56b6218e17
📒 Files selected for processing (11)
src/Socket/messages-recv.tssrc/Socket/newsletter.tssrc/Types/Newsletter.tssrc/Utils/contact-picture-identity.tssrc/Utils/index.tssrc/Utils/multi-db-sqlite/schemas/index.tssrc/Utils/multi-db-sqlite/schemas/status.tssrc/Utils/multi-db-sqlite/store.tssrc/Utils/multi-db-sqlite/use-multi-db-sqlite-auth-state.tssrc/__tests__/Utils/contact-picture-identity.test.tssrc/__tests__/Utils/multi-db-sqlite-auth-state.test.ts
💤 Files with no reviewable changes (1)
- src/Types/Newsletter.ts
…a picture fallback PR #508 review caught an ambiguity in the picture-fallback chain inherited from upstream PR WhiskeySockets#2620 (#503 port). The original chain only looked inside `thread_metadata`: const pic = thread.picture ?? thread.image ?? thread.preview but the in-code comment noted that for preview-only responses (non-followed channel via invite) the server returns `image` / `preview` SIBLINGS of `thread_metadata` rather than children of it. The chain was missing the sibling case, so the picture came back undefined for that flow. Extend the fallback to also try `node.image` and `node.preview`. Additive and defensive — `undefined ?? undefined` short-circuits cleanly when the server returns the followed-channel shape (which has worked since #503 merged). Also refine the comment so the chain is unambiguous on the next read. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…a picture fallback PR #508 review caught an ambiguity in the picture-fallback chain inherited from upstream PR WhiskeySockets#2620 (#503 port). The original chain only looked inside `thread_metadata`: const pic = thread.picture ?? thread.image ?? thread.preview but the in-code comment noted that for preview-only responses (non-followed channel via invite) the server returns `image` / `preview` SIBLINGS of `thread_metadata` rather than children of it. The chain was missing the sibling case, so the picture came back undefined for that flow. Extend the fallback to also try `node.image` and `node.preview`. Additive and defensive — `undefined ?? undefined` short-circuits cleanly when the server returns the followed-channel shape (which has worked since #503 merged). Also refine the comment so the chain is unambiguous on the next read. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Summary
Promote
developintomaster. Three feature PRs from this cycle:fix(newsletter): parse metadata and fetch-messages responses (#2620 port)fix(contacts): resolve LID↔PN for profile-picture contacts.update (port PR #2605)(empirically validated via Frida on WA Business 2.26.21.75)feat(phase9): add status.db (14th file) — Status feed + channel-crosspost schema(schema ships ahead of callers; idempotent indexes match canonical mobile schema)Also brings the master-only version bumps #504 (WAProto v2.3000.1040967287) and #505 (baileys-version v2.3000.1040973525) into the release base via the standard merge-master-into-release step.
Conflicts resolved
None.
git merge origin/masterran clean — the version bumps live in 2 isolated files (WAProto/WAProto.proto,src/Defaults/baileys-version.json) that none of #503/#506/#507 touched.What this brings to master
Test plan
npm run build— 3 phases pass, zero errorsNotes
open()without migration.🤖 Generated with Claude Code
Summary by cubic
Promotes develop to master with three changes: fixes newsletter metadata parsing and message fetch, improves
contacts.updatepicture events with LID↔PN resolution, and adds thestatus.dbfile to the multi-DB store.Bug Fixes
thread_metadataand siblingnode.image/previewfallbacks; use the correctmessagesfetch ons.whatsapp.netand return structured message results.New Features
status.db(14th SQLite file) with Status feed + channel crosspost schema; opened automatically, no migration needed.Written for commit 3d03204. Summary will update on new commits.
Summary by CodeRabbit
New Features
Improvements
Tests
Documentation