Repository navigation
Hang up incoming calls with the maintenance message when set - #195
Merged
Merged
Conversation
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
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
event-management-nraandteacher-report-nraalready checkthis.user.additionalData?.maintainanceMessageat the top ofprocessCall()and hang up immediately with that message. This project's ownYemotHandlerServicenever did — its class docstring already claimed "Currently returns a maintenance mode message", which was stale until this PR.Uses
this.user?.additionalData(optional-chained onthis.useritself too) to match this file's existing null-tolerant handling ofthis.user(seehasPermission(this.user, ...), which never assumesthis.useris set).Test plan
npx tsc --noEmit— cleanyarn 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