← Back to Pull requests

feat(mqtt): publish the ringing call's caller to incoming-call/caller #3022

Closed
unknown closed this pull request without merging on Oct 01, 2026 07:11 UTC
View on GitHub
unknown unknown commented on Sep 27, 2026 23:17 UTC
Author

Summary

incoming-call says only that something is ringing. The toast Teams raises for the call already says who it is, and the renderer already reads part of it for the incoming-call command and toast, but the event that reaches the MQTT service carried nothing.

The renderer now works the caller out of the toast's entityOptions and passes it on with teams-incoming-call-started. When mqtt.incomingCallCaller.enabled is true (it defaults to false), the service publishes it as JSON to {topicPrefix}/incoming-call/caller just before incoming-call goes "true": scenario always, and where known number, name, queue, contact and callId, with a timestamp and the clientId as the status topic carries. Only those fields are copied, so the caller's picture never reaches the broker.

  • Opt-in. The caller's name and number are personal details, so nothing is published until the option is turned on; incoming-call itself is unchanged. privacy.md says what is sent when it is.

  • Not retained. The caller describes a call that is ringing now. A retained copy could outlive the call if the app quit or lost the broker mid-ring; unretained, it cannot. Nothing is published on the topic when ringing stops, since incoming-call going "false" already says so.

  • Not logged. MQTTClient.publish() takes a redactLog option that leaves the topic and payload out of its logs, and the caller is published with it.

  • Topic name. It follows incomingCall, as microphoneControl follows microphone, and can be set with mqtt.mediaTopics.incomingCallCaller.
  • The fields follow toasts seen for a direct phone call and both kinds of call-queue call: title is the caller's number as Teams formats it, text is their name or the number again when Teams cannot match them, and a queue call names the queue in headerSubtitle. In conference mode a queue call's toast is sent twice while ringing, the first before the caller is matched (its headerSubtitle is Teams' "Unknown user" placeholder), so the caller is published from each toast; the docs call this out. A title that is not a number is taken as the name, which is what a call from a Teams user is expected to carry; that case has not been seen.

    Refs #3019

    Testing

  • [X] npm run lint (required)

  • [X] npm run test:unit

  • npm run test:e2e

  • [X] Ran the app manually (npm start) and exercised the affected path

  • Cross-distro / packaging build (npm run cross-distro)
  • Documentation

  • [X] Updated docs-site/docs/... (mqtt-integration.md, configuration.md, privacy.md, regenerated configuration-generated.md and config-schema.json)

  • [X] Updated module README.md (app/mqtt/README.md)

  • Added the new channel to app/security/ipcValidator.js and ran npm run generate-ipc-docs (IPC channel added or changed)

  • [X] No new PII added to logs (see CLAUDE.md "Logging Guidelines")
  • 🤖 Generated with Claude Code

    https://claude.ai/code/session_014eZQ2xaNZeq8ddcAK2WAKH

    <!-- greptile_comment -->

    <!-- greptile_summary -->

    <h2><a href="https://app.greptile.com/api/retrigger?id=70327385"><picture><source media="(prefers-color-scheme: dark)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/RetriggerDark.svg?v=2"><source media="(prefers-color-scheme: light)" srcset="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"><img alt="Retrigger" src="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2" align="right"></picture></a>Confidence Score: 5/5</h2>

    <!-- greptile-risk -->

    The PR appears safe to merge; no outstanding findings remain.

    <h3>Summary</h3>

    The PR adds an opt-in MQTT message with incoming-call caller details, updates configuration and privacy documentation, and adds tests for publication and logging. The changes since the previous review make caller publication disabled by default; the earlier findings are resolved.

    <details open><summary>Diagram</summary>

    %%{init: {'theme': 'neutral'}}%%
    flowchart LR
      A[Incoming-call toast] --> B[Extract caller details]
      B --> C{Caller publishing enabled?}
      C -- Yes --> D[Publish unretained caller JSON]
      C -- No --> E[Skip caller topic]
      D --> F[Publish incoming-call true]
      E --> F
    

    </details>

    <!-- greptile_confidence_score:5 -->

    <sub>Reviews (4) · Last reviewed commit: "feat(mqtt): make the incoming-call calle..."</sub>

    <!-- /greptile_comment -->

    Diff: 572 lines (+429 / -143) across 7 files Reviewer: jcollie Review duration: 4794m
    All Vouch review confidence checks passed
    Residual risk 0.22 = Change Risk (0.50) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.50 · 572 lines diff across 7 files
    0.50
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.380
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #3022"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 49.8% (MEDIUM) · Higher = larger blast radius
    49.8%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 21.5% · Safe to merge
    21.5%