Module: CommandTower::Messaging::ChannelDetectors
- Defined in:
- app/services/command_tower/messaging/channel_detectors.rb
Overview
Shared platform channel configuration detectors.
Answers transport/deployment readiness questions (is email/SMS/Pushover configured?). Does not own host channel-set policy (PlatformEnabledChannels), recipient readiness, or Account UX capability projection.
SMS product readiness (Messaging notification SMS ∧ Identity OTP SMS) is exposed separately from sms_configured? so Planner/Execution platform_configured stays Messaging-only while Me phone HTTP / host SMS policy use the dual-gate.
Class Method Summary collapse
-
.configured?(channel_key) ⇒ Boolean
Used by RecipientReadiness#platform_configured_for? (fail-closed).
- .email_configured? ⇒ Boolean
- .pushover_configured? ⇒ Boolean
- .sms_configured? ⇒ Boolean
-
.sms_product_ready? ⇒ Boolean
Messaging notification SMS ∧ Identity OTP SMS.
Class Method Details
.configured?(channel_key) ⇒ Boolean
Used by RecipientReadiness#platform_configured_for? (fail-closed).
30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'app/services/command_tower/messaging/channel_detectors.rb', line 30 def configured?(channel_key) case channel_key.to_s when "inbox" true when "email" email_configured? when "sms" sms_configured? when "pushover" pushover_configured? else false end end |
.email_configured? ⇒ Boolean
17 18 19 |
# File 'app/services/command_tower/messaging/channel_detectors.rb', line 17 def email_configured? Execution::Adapters::Email::Configuration.email_configured? end |
.pushover_configured? ⇒ Boolean
25 26 27 |
# File 'app/services/command_tower/messaging/channel_detectors.rb', line 25 def pushover_configured? Execution::Adapters::Pushover::Configuration.pushover_configured? end |
.sms_configured? ⇒ Boolean
21 22 23 |
# File 'app/services/command_tower/messaging/channel_detectors.rb', line 21 def sms_configured? Execution::Adapters::Sms::Configuration.sms_configured? end |
.sms_product_ready? ⇒ Boolean
Messaging notification SMS ∧ Identity OTP SMS.
46 47 48 49 |
# File 'app/services/command_tower/messaging/channel_detectors.rb', line 46 def sms_product_ready? sms_configured? && CommandTower::Identity::PhoneVerification::SmsConfiguration.sms_ready? end |