Skip to content

Hang up incoming calls with the maintenance message when set - #195

Merged
buzz-code merged 1 commit into
mainfrom
feature/yemot-maintenance-mode
Sep 22, 2026
Merged

buzz-code merged 1 commit into
mainfrom
feature/yemot-maintenance-mode

Conversation

@buzz-code

Copy link
Copy Markdown
Owner

Summary

event-management-nra and teacher-report-nra already check this.user.additionalData?.maintainanceMessage at the top of processCall() and hang up immediately with that message. This project's own YemotHandlerService never did — its class docstring already claimed "Currently returns a maintenance mode message", which was stale until this PR.

Uses this.user?.additionalData (optional-chained on this.user itself too) to match this file's existing null-tolerant handling of this.user (see hasPermission(this.user, ...), which never assumes this.user is set).

Test plan

  • npx tsc --noEmit — clean
  • yarn test — 118/118 suites, 1039/1039 tests pass (includes new maintenance scenario)

🤖 Generated with Claude Code

https://claude.ai/code/session_01VwgtFx4bsoC4bS1Mw2jBms


Generated by Claude Code

event-management-nra and teacher-report-nra already check
this.user.additionalData?.maintainanceMessage at the top of
processCall() and hang up immediately with it; this project's own
processCall never did (its class docstring already claimed it does,
which was stale until now). Wires the same check here, using
this.user?.additionalData to match this file's existing null-tolerant
pattern for this.user (see hasPermission(this.user, ...) above).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VwgtFx4bsoC4bS1Mw2jBms
Copilot AI lite review requested due to automatic review settings September 22, 2026 16:44

Copilot AI 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.

Copilot review overview

🟢 Approval recommended

The maintenance behavior is implemented and covered by tests.

Review effort: Lite
Findings: None

What changed in this PR

Adds maintenance-mode hangup handling for incoming Yemot calls before normal routing.

Changes:

  • Hangs up with the configured maintenance message.
  • Adds regression coverage for immediate hangup behavior.
File Description
server/​src/​yemot-handler.service.ts Adds maintenance early return.
server/​src/​yemot-handler.service.test.ts Tests maintenance hangup behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@buzz-code
buzz-code merged commit 064f23b into main Sep 22, 2026
5 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.

3 participants