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|
|---|---|---|---|
|
|
0ac37338ab |
Add Twilio, VoIP.ms, and SignalWire SMS providers
Adds three new selectable providers behind the existing Sms.send_message interface. Per-account credentials are namespaced in the encrypted sms_configs hash (twilio_*, voipms_*, signalwire_*) so existing BulkVS configs keep working unchanged. - lib/sms.rb: dispatch via per-provider classes and delegate the "is this configured" check to each provider, replacing the BulkVS-only hardcoded gate in enabled_for?. - lib/sms/providers/twilio.rb: form-encoded POST to the Messages API, Basic Auth with SID:Token, treats 201-with-error_code as failure. - lib/sms/providers/voipms.rb: GET with query-string auth, treats status != "success" as failure even on HTTP 200, enforces the API's 160-byte hard cap up front. - lib/sms/providers/signalwire.rb: Twilio-shaped client targeting the per-account Space URL host; strips https:// and trailing / from the user-supplied space URL. - app/controllers/sms_settings_controller.rb: extend the preserve-secret-on-blank-edit pattern to all four providers' password fields via a SECRET_KEYS array. - app/views/sms_settings/index.html.erb: dynamic provider select sourced from Sms::SUPPORTED_PROVIDERS with per-provider field blocks toggled by a nonce'd inline script (the app's CSP requires nonces on inline JS). - SMS.md: new "Configuring …" sections for each provider, wire-format quick-reference table, and updated extension/code-map sections. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> |
1 month ago |
|
|
1872a0995b |
Wire SMS sending via BulkVS
Replaces the SMS placeholder with an actual provider integration. v1
ships BulkVS only; the architecture leaves room for additional
providers behind the same Sms.send_message interface.
Storage:
- EncryptedConfig key `sms_configs` (added to CONFIG_KEYS):
{ provider, enabled, basic_auth_token, from_number,
delivery_webhook_url }
- AccountConfig key `submitter_invitation_sms` for the per-account
SMS body template override.
Service layer:
- lib/sms.rb — Sms.enabled_for?(account), Sms.send_message
(account:, to:, text:), Sms.normalize_phone
- lib/sms/providers/bulkvs.rb — POST to
https://portal.bulkvs.com/api/v1.0/messageSend with the
pre-encoded Basic Auth header from the BulkVS portal. Surfaces
non-2xx responses as Sms::ProviderError with the upstream message.
Background sending:
- app/jobs/send_submitter_invitation_sms_job.rb — mirrors
SendSubmitterInvitationEmailJob; substitutes account-template
variables via the existing ReplaceEmailVariables module so
{account.name} / {submitter.link} / etc. work in the SMS body.
- submitters_controller#maybe_resend_email_sms already enqueues
this job when params[:send_sms] == '1', so the existing
"Send SMS" toggle in the submitter edit form now does what it
says on the tin.
Controllers/routes:
- SmsSettingsController gains create + test_message; the test_message
action lets an admin verify their config with a one-off SMS
against any phone number.
- SubmittersSendSmsController#create powers the per-submitter
"Send SMS" button (mirrors SubmittersSendEmailController).
- Routes: resources :sms with create + test_message; submitters
nested resources :send_sms.
Views:
- app/views/sms_settings/index.html.erb — real form replacing the
"not bundled" placeholder. Status banner reflects live config.
Test-send card renders only when SMS is enabled.
- app/views/submissions/_send_sms_button.html.erb — was a permanently
disabled stub; now button_to the new send_sms endpoint when SMS
is configured and the submitter has a phone number. Falls back to
a tooltip explaining what's missing otherwise.
- app/views/submissions/_send_sms.html.erb — was a placeholder render;
now shows a real "send SMS on save" toggle when SMS is configured.
- app/views/personalization_settings/_signature_request_sms_form.html.erb
+ show.html.erb — per-account SMS body override with variable
documentation.
Smoke-tested in a built image:
- /settings/sms renders 200, all form fields present.
- /settings/personalization renders the SMS body field.
- With saved (bogus) creds, Sms.send_message hits BulkVS over HTTPS
and surfaces the real 401 as Sms::ProviderError — proves the
transport is wired, not just the boot path.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
1 month ago |