Skip to content

I don't know what I'm doing#2664

Open
AgusXzz wants to merge 1 commit into
WhiskeySockets:masterfrom
AgusXzz:master
Open

I don't know what I'm doing#2664
AgusXzz wants to merge 1 commit into
WhiskeySockets:masterfrom
AgusXzz:master

Conversation

@AgusXzz

@AgusXzz AgusXzz commented Jun 27, 2026

Copy link
Copy Markdown

Summary by cubic

Fixed incorrect debug logging for contacts.upsert events; the handler now logs events['contacts.upsert'] instead of events['message-receipt.update'], improving observability and debugging clarity.

Written for commit 2646afc. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Bug Fixes
    • Corrected a debug log message for contact update events so it now reports the proper event type instead of showing an unrelated receipt update event.

@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@AgusXzz/Baileys#master

# Yarn (v2+)
yarn add @whiskeysockets/baileys@AgusXzz/Baileys#master

# PNPM
pnpm add @whiskeysockets/baileys@AgusXzz/Baileys#master

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

@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The debug log inside the contacts.upsert branch now references events['contacts.upsert'] instead of events['message-receipt.update'].

Changes

Event log reference correction

Layer / File(s) Summary
contacts.upsert debug log
Example/example.ts
The contacts.upsert branch now passes events['contacts.upsert'] to logger.debug(...) instead of events['message-receipt.update'].

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 I hopped through logs with a twitchy nose,
One wrong event key? No, not those!
Now contacts.upsert sings its own refrain,
And bunny-debug hops neat again.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title is unrelated to the actual change, which fixes a गलत debug log key in contacts.upsert handling. Rename the PR to describe the logging fix, such as correcting the contacts.upsert debug event reference.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
Example/example.ts (1)

187-188: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add a message string to this structured log call.

This now logs the right payload, but the changed call still drops the message text required by the repo’s logging convention. Please keep the payload first and add a trailing message, e.g. logger.debug(events['contacts.upsert'], 'contacts.upsert event fired').

🤖 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 `@Example/example.ts` around lines 187 - 188, The logger.debug call in the
contacts.upsert handling path is missing the required trailing message string,
so update the structured log invocation in the event handler to keep
events['contacts.upsert'] as the payload and add a concise message argument
after it. Use the existing logger.debug call in the contacts.upsert branch as
the fix point and follow the repo’s convention of payload first, message second.

Source: Coding guidelines

🤖 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 `@Example/example.ts`:
- Around line 187-188: The logger.debug call in the contacts.upsert handling
path is missing the required trailing message string, so update the structured
log invocation in the event handler to keep events['contacts.upsert'] as the
payload and add a concise message argument after it. Use the existing
logger.debug call in the contacts.upsert branch as the fix point and follow the
repo’s convention of payload first, message second.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: b8df5198-7c2a-43c6-873c-99a7ba4f339f

📥 Commits

Reviewing files that changed from the base of the PR and between 731cd6b and 2646afc.

📒 Files selected for processing (1)
  • Example/example.ts

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 1 file

Re-trigger cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants