docs: tctoken/spam-report/usync privacy token attachment for #969 - #374
Conversation
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
|
Warning Review limit reached
Next review available in: 48 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
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. Comment |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
| 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]
%%{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]
Reviews (2): Last reviewed commit: "docs: qualify spam-report tctoken bullet..." | Re-trigger Greptile
There was a problem hiding this comment.
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
There was a problem hiding this comment.
💡 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".
Per Codex review on #374. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016iZ62WBp2t4EbUGvzJZYpF
There was a problem hiding this comment.
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
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_infonow attaches each queried JID's TC token to the usync<user>node, so status/about resolves for privacy-restricted contacts (gated behindprofile_scraping_privacy_token_in_about_usync).send_spam_reportnow attaches the reported contact's TC token to the spam report IQ (gated behindenable_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, andapi/contacts.mdxdocumentsstatus_errorfor privacy-hidden status without explaining thatget_user_infonow 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 thatget_user_infoattaches TC tokens for status/about, next to the existing profile-picture note.api/spam-report.mdx: added a note thatsend_spam_reportautomatically attaches the reported contact's TC token whenfrom_jidis 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) andsend_spam_reportwhenfrom_jidis 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.