Skip to content

docs: tctoken/spam-report/usync privacy token attachment for #969 - #374

Merged
jlucaso1 merged 3 commits into
mainfrom
claude/nifty-bohr-tgow7t
Jul 3, 2026
Merged

docs: tctoken/spam-report/usync privacy token attachment for #969#374
jlucaso1 merged 3 commits into
mainfrom
claude/nifty-bohr-tgow7t

Conversation

@jlucaso1

@jlucaso1 jlucaso1 commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

whatsapp-rust#969 extended automatic TC token attachment to two more privacy-gated IQs that weren't previously covered by the docs:

  • get_user_info now attaches each queried JID's TC token to the usync <user> node, so status/about resolves for privacy-restricted contacts (gated behind profile_scraping_privacy_token_in_about_usync).
  • send_spam_report now attaches the reported contact's TC token to the spam report IQ (gated behind enable_spam_report_iq_with_privacy_token).

Both were pure internal/wire-protocol fixes with no public API changes (no new params, no signature changes), but api/tctoken.mdx's "Automatic usage" section already enumerates every attachment point (messages, profile pictures) and would otherwise go stale, and api/contacts.mdx documents status_error for privacy-hidden status without explaining that get_user_info now resolves it via tctoken.

Changes

  • api/tctoken.mdx: added the usync/spam-report attachment points and their gating AB props to "Automatic usage".
  • api/contacts.mdx: noted that get_user_info attaches TC tokens for status/about, next to the existing profile-picture note.
  • api/spam-report.mdx: added a note that send_spam_report automatically attaches the reported contact's TC token when from_jid is set.

No changelog changes included, per instructions.

Ref: oxidezap/whatsapp-rust#969


Generated by Claude Code


Summary by cubic

Updated TC token docs to include automatic attachment for get_user_info (USync status/about) and send_spam_report when from_jid is set, so status/about resolve and spam reports work for privacy-restricted contacts. Clarifies AB gating (profile_scraping_privacy_token_in_about_usync, enable_spam_report_iq_with_privacy_token), aligns "hidden"/"empty" wording, and calls out about in contacts; no API changes.

Written for commit 27dd490. Summary will update on new commits.

whatsapp-rust#969 extended automatic TC token attachment beyond
messages/profile pictures to get_user_info (usync status/about) and
send_spam_report, each gated behind its own AB prop. Document the new
attachment points and gating props alongside the existing ones.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016iZ62WBp2t4EbUGvzJZYpF
@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@jlucaso1, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 48 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: e5abc751-d519-43ea-ba5a-111e63858c77

📥 Commits

Reviewing files that changed from the base of the PR and between 82d7641 and 27dd490.

📒 Files selected for processing (3)
  • api/contacts.mdx
  • api/spam-report.mdx
  • api/tctoken.mdx

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.

@mintlify

mintlify Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
whatsapp-rust 🟢 Ready View Preview Jul 3, 2026, 10:03 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@greptile-apps

greptile-apps Bot commented Jul 3, 2026

Copy link
Copy Markdown

Greptile Summary

This PR is a documentation-only update that extends the "Automatic usage" section of api/tctoken.mdx to cover two additional privacy-gated IQ attachment points introduced in whatsapp-rust#969, and adds corresponding inline notes in api/contacts.mdx and api/spam-report.mdx.

  • api/tctoken.mdx: Adds get_user_info (usync per-recipient token, gated by profile_scraping_privacy_token_in_about_usync) and send_spam_report (token on from_jid-based reports, gated by enable_spam_report_iq_with_privacy_token) to the automatic attachment list, plus a Rust snippet and a clarifying paragraph noting these props are independent from the message-stanza props and have no cstoken fallback.
  • api/contacts.mdx: Adds a sentence to the Privacy & TC tokens section explaining that get_user_info resolves both status/status_error and about for privacy-restricted contacts via the same mechanism, with a cross-reference to tctoken.mdx.
  • api/spam-report.mdx: Inserts a <Note> callout after the individual spam-report example documenting the automatic token attachment when from_jid is set, with a cross-reference to tctoken.mdx.

Confidence Score: 5/5

Documentation-only change with no code modifications; safe to merge.

All three files contain purely additive prose additions documenting existing wire-protocol behaviour. Terminology is consistent across pages ("hidden", mentions both status/about), cross-references are correct, and the new Note and bullet points accurately reflect the gating conditions described in the PR. The previously flagged inconsistencies (empty vs hidden, missing about field) have been resolved in this revision.

No files require special attention.

Important Files Changed

Filename Overview
api/tctoken.mdx Adds two new attachment points (get_user_info usync and send_spam_report) to the Automatic Usage section, with code examples and a clarifying paragraph about their independent gating props. Uses consistent "hidden" terminology and correctly notes no cstoken fallback.
api/contacts.mdx Adds a single prose sentence explaining that get_user_info attaches TC tokens for status/about privacy resolution, now correctly mentioning both status/status_error and about fields, with a cross-reference to tctoken.mdx.
api/spam-report.mdx Inserts a Note callout after the individual spam-report example explaining that from_jid triggers automatic TC token attachment, gated behind enable_spam_report_iq_with_privacy_token, with a cross-reference to tctoken.mdx.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Client API Call] --> B{Which operation?}
    B --> C[send_message / get_profile_picture]
    B --> D[get_user_info]
    B --> E[send_spam_report]

    C --> F{PRIVACY_TOKEN_ON_ALL_1_ON_1_MESSAGES?}
    F -- on --> G[Attach tctoken]
    F -- off --> H{NCT_TOKEN_SEND_ENABLED?}
    H -- on --> I[Attach cstoken fallback]
    H -- off --> J[No token]

    D --> K{profile_scraping_privacy_token_in_about_usync?}
    K -- on --> L[Attach tctoken per user node in usync IQ]
    K -- off --> M[No token — status/about may be hidden]

    E --> N{from_jid set?}
    N -- no --> O[No token — group reports only]
    N -- yes --> P{enable_spam_report_iq_with_privacy_token?}
    P -- on --> Q[Attach tctoken to spam report IQ]
    P -- off --> R[No token — report may be rejected]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[Client API Call] --> B{Which operation?}
    B --> C[send_message / get_profile_picture]
    B --> D[get_user_info]
    B --> E[send_spam_report]

    C --> F{PRIVACY_TOKEN_ON_ALL_1_ON_1_MESSAGES?}
    F -- on --> G[Attach tctoken]
    F -- off --> H{NCT_TOKEN_SEND_ENABLED?}
    H -- on --> I[Attach cstoken fallback]
    H -- off --> J[No token]

    D --> K{profile_scraping_privacy_token_in_about_usync?}
    K -- on --> L[Attach tctoken per user node in usync IQ]
    K -- off --> M[No token — status/about may be hidden]

    E --> N{from_jid set?}
    N -- no --> O[No token — group reports only]
    N -- yes --> P{enable_spam_report_iq_with_privacy_token?}
    P -- on --> Q[Attach tctoken to spam report IQ]
    P -- off --> R[No token — report may be rejected]
Loading

Reviews (2): Last reviewed commit: "docs: qualify spam-report tctoken bullet..." | Re-trigger Greptile

Comment thread api/tctoken.mdx Outdated
Comment thread api/contacts.mdx Outdated

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 3 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Auto-approved: Pure documentation update across 3 API docs files (21 lines). Adds notes about TC token attachment for usync and spam-report IQs. No code changes, no API changes, no logic changes.

Re-trigger cubic

Per Greptile review on #374.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016iZ62WBp2t4EbUGvzJZYpF

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2d739a6338

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread api/tctoken.mdx Outdated
Per Codex review on #374.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016iZ62WBp2t4EbUGvzJZYpF

@cubic-dev-ai cubic-dev-ai 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.

0 issues found across 2 files (changes from recent commits).

Auto-approved: Documentation-only updates clarifying TC token attachment for usync and spam-report IQs, matching existing wire-protocol fixes. No code, config, or API changes; low risk.

Re-trigger cubic

@jlucaso1
jlucaso1 merged commit feea4d9 into main Jul 3, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants