Skip to content

docs: tctoken attach/issue on outgoing VoIP call offers for #970 - #376

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

docs: tctoken attach/issue on outgoing VoIP call offers for #970#376
jlucaso1 merged 3 commits into
mainfrom
claude/nifty-bohr-y68m08

Conversation

@jlucaso1

@jlucaso1 jlucaso1 commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

whatsapp-rust#970 closed the last documented gap in the trusted-contact token sweep: outgoing 1:1 VoIP call offers now attach the callee's stored tctoken and issue a fresh one after the offer sends (matching WA Web's sendTcToken in StartCall.js). api/tctoken.mdx's "Automatic usage" section already enumerates every other attachment point (messages, profile pictures, usync, spam report) and would otherwise go stale, and guides/voip-calls.mdx documents placing an outgoing call with no mention of privacy-token handling.

Changes

  • api/tctoken.mdx: added outgoing call offers as a third "no cstoken fallback" attachment point in "Automatic usage", with a code snippet. Noted in "AB prop gating" that this path is unconditional — no AB prop gates it, unlike the message/usync/spam-report paths, which is the one point worth calling out since every other automatic-attachment path documented here is gated.
  • guides/voip-calls.mdx: added a note under "Placing an Outgoing Call" pointing to the TC Token docs, so callers know the behavior is automatic and don't go looking for a manual API.

No changelog changes included, per instructions.

Ref: oxidezap/whatsapp-rust#970


Generated by Claude Code


Summary by cubic

Documented automatic trusted-contact token attach and conditional post-send issuance for outgoing 1:1 VoIP call offers, matching WhatsApp Web’s sendTcToken in StartCall.js. Clarified this path is ungated and that reissuance runs only when the sender-side bucket has rolled over, and added the flow to the lifecycle diagram to prevent 463 nacks with privacy-restricted contacts.

  • api/tctoken.mdx: Added call offers as an automatic attachment point, noted it’s unconditional (no AB prop), and included the call-offer flow in the lifecycle diagram.
  • guides/voip-calls.mdx: Noted that offers auto-attach a stored token and issue a fresh one only if the sender bucket rolled over; 1:1 only for now.

Written for commit a331f42. Summary will update on new commits.

…rust#970

Documents place_call attaching the callee's stored token to the offer's
<privacy> node and issuing a fresh token after send, and that this path
has no AB prop gate unlike the message/usync/spam-report paths.
@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, 11:00 PM

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

@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: 51 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: e3e2998b-a90b-4197-aa74-e4799ebd31d2

📥 Commits

Reviewing files that changed from the base of the PR and between fa99954 and a331f42.

📒 Files selected for processing (2)
  • api/tctoken.mdx
  • guides/voip-calls.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.

@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 2 files

Confidence score: 5/5

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

Auto-approved: Pure documentation updates adding details about tctoken behavior in VoIP calls. No code changes, no risk of breaking functionality.

Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Jul 3, 2026

Copy link
Copy Markdown

Greptile Summary

Closes the last undocumented gap in the trusted-contact token sweep: outgoing 1:1 VoIP call offers now attach the callee's stored token and issue a fresh one post-send, matching WA Web's sendTcToken in StartCall.js. Both the token API reference and the VoIP guide are updated to reflect this.

  • api/tctoken.mdx: adds the VoIP path as a third "no cstoken fallback" site, calls out that it is unconditional (unlike the usync/spam-report paths), and extends the lifecycle sequence diagram with the full offer/ack/issuance flow.
  • guides/voip-calls.mdx: adds a <Note> under "Placing an Outgoing Call" so callers know the behaviour is automatic and cross-links to the tctoken API page.

Confidence Score: 5/5

Documentation-only change; no executable code is modified.

Both files receive purely additive documentation updates. The bullet list count ("three other call sites") is accurate, the "unconditional / no AB prop gate" distinction is correctly applied only to the VoIP path, the sequence diagram faithfully mirrors the bullet-point description, and the voip-calls guide note is consistent with the API reference. No contradictions or omissions were found.

No files require special attention.

Important Files Changed

Filename Overview
api/tctoken.mdx Added outgoing 1:1 call offers as a third "no cstoken fallback" attachment point, noted it is unconditional in the AB prop gating section, and added the full VoIP offer flow to the lifecycle sequence diagram.
guides/voip-calls.mdx Added a block after the outgoing-call example informing callers that tctoken attach/issue is automatic, with a cross-link to the tctoken API page.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
    participant App
    participant Client
    participant Backend
    participant Server

    Note over App,Server: Outgoing 1:1 call offer (voip feature, unconditional)
    App->>Client: "voip().call(&peer).audio(...).start()"
    Client->>Backend: Get tc_token for peer
    Backend-->>Client: TcTokenEntry or None
    Client->>Server: Call offer (tctoken as leading privacy child if stored)
    Server-->>Client: Offer ack
    Client-->>App: CallHandle
    Client->>Server: IQ set (issue fresh token to callee, if sender bucket rolled over)
    Server-->>Client: IQ success
    Client->>Backend: touch_tc_token_sender_timestamp
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"}}}%%
sequenceDiagram
    participant App
    participant Client
    participant Backend
    participant Server

    Note over App,Server: Outgoing 1:1 call offer (voip feature, unconditional)
    App->>Client: "voip().call(&peer).audio(...).start()"
    Client->>Backend: Get tc_token for peer
    Backend-->>Client: TcTokenEntry or None
    Client->>Server: Call offer (tctoken as leading privacy child if stored)
    Server-->>Client: Offer ack
    Client-->>App: CallHandle
    Client->>Server: IQ set (issue fresh token to callee, if sender bucket rolled over)
    Server-->>Client: IQ success
    Client->>Backend: touch_tc_token_sender_timestamp
Loading

Reviews (3): Last reviewed commit: "docs: qualify VoIP tctoken reissuance ra..." | Re-trigger Greptile

Comment thread api/tctoken.mdx Outdated
Reword the intro line so it doesn't imply the VoIP call-offer path is
AB-prop-gated like the other two, and add the VoIP path to the token
lifecycle sequence diagram.

@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 1 file (changes from recent commits).

Auto-approved: Documentation updates describing automated TC token handling for VoIP call offers.

Re-trigger cubic

greptile-apps[bot]
greptile-apps Bot previously approved these changes Jul 3, 2026
Per Greptile's nit, the note overstated issuance as happening after
every offer instead of only when the sender-side bucket rolls over.
@greptile-apps
greptile-apps Bot dismissed their stale review July 3, 2026 23:06

Dismissed because a newer commit was pushed; Greptile will re-review the current head.

@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 1 file (changes from recent commits).

Auto-approved: Documentation updates for tctoken attachment in VoIP calls.

Re-trigger cubic

@jlucaso1
jlucaso1 merged commit bef4517 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