Skip to content

RE1-T117 twilio fix#414

Merged
ucswift merged 1 commit into
masterfrom
develop
Jun 22, 2026
Merged

RE1-T117 twilio fix#414
ucswift merged 1 commit into
masterfrom
develop

Conversation

@ucswift

@ucswift ucswift commented Jun 22, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Bug Fixes
    • Inbound SMS commands now return explicit error messages instead of failing silently. When a sender's number isn't linked to a user account, instructions are provided to link the number. When a department plan doesn't support SMS messaging, users are notified to upgrade their plan.

@request-info

request-info Bot commented Jun 22, 2026

Copy link
Copy Markdown

Thanks for opening this, but we'd appreciate a little more information. Could you update it with more details?

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a9941d6f-a817-4bbe-be9c-90f4dcb3799e

📥 Commits

Reviewing files that changed from the base of the PR and between e348678 and 21621e4.

📒 Files selected for processing (1)
  • Web/Resgrid.Web.Services/Controllers/TwilioController.cs

📝 Walkthrough

Walkthrough

In TwilioController.ProcessTextCommandsAsync, two previously silent failure paths now return explicit TwiML reply messages. When the sender's mobile number resolves to a department but no matching user profile is found, or when the department plan does not authorize inbound text messaging, the controller sets messageEvent.Processed = true and returns an informational message to the sender.

Changes

Inbound SMS Fallback Reply Messages

Layer / File(s) Summary
Profile-not-found and plan-gate TwiML replies
Web/Resgrid.Web.Services/Controllers/TwilioController.cs
Lines 300–307: adds a TwiML <Message> reply and sets Processed = true when profile == null after department resolution. Lines 525–532: adds an else branch for the plan-gate path that sets Processed = true and returns a TwiML message directing the user to upgrade their plan.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Possibly related PRs

  • Resgrid/Core#338: Updates the same TwilioController inbound SMS flow to retrieve department plan/provisioning info via SubscriptionsService, directly touching the plan-gate logic that this PR now handles with an explicit reply.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'RE1-T117 twilio fix' is vague and uses generic terminology without explaining what specific issue was fixed or what the primary change accomplishes. Replace with a descriptive title that explains the specific fix, such as 'Add Twilio SMS replies for unlinked users and unauthorized departments' or 'Fix Twilio inbound SMS to handle unlinked users and plan restrictions'.
✅ 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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch develop

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.

@ucswift

ucswift commented Jun 22, 2026

Copy link
Copy Markdown
Member Author

Approve

@github-actions github-actions 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.

This PR is approved.

@ucswift ucswift merged commit 27a0c4f into master Jun 22, 2026
19 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.

1 participant