diff --git a/docs/REFERENCE-environment_variables.md b/docs/REFERENCE-environment_variables.md index 5d2594446..2eaa355cd 100644 --- a/docs/REFERENCE-environment_variables.md +++ b/docs/REFERENCE-environment_variables.md @@ -40,6 +40,7 @@ | DEV_APP_PORT | Port for development Webpack server. Required for development. | | DOWNTIME | When enabled it will redirect users to a /downtime page. If set to a string, it will show the string as a message to users on the downtime page. Use this to take the system down for maintenance. It will NOT stop graphql requests and will NOT stop users that are already in the app. | | DOWNTIME_NO_DB | On AWS Lambda this blocks the site from loading the app at all and swaps out a system that redirects users to /downtime. This is useful for DB maintenance. For non-Lambda environments, just run the src/server/downtime app instead of src/server/index default app | +| DOWNTIME_NO_INITIAL | When enabled, texters will see a message telling them that sending of initial messages is paused, but they will still be able to reply to any incoming responses. | | DOWNTIME_TEXTER | Setting DOWNTIME_TEXTER to a text message (without quotes, please) will give the message as a text to texters when they arrive on the site, but the admin pages will still be accessible. This could be useful if you want to stop new texters from landing on the site and texting, while you debug things. | | DST_REFERENCE_TIMEZONE | Timezone to use to determine whether DST is in effect. If it's DST in this timezone, we assume it's DST everywhere. _Default_: "US/Eastern". (The default will work for any campaign in the US. For example, if the campaign is in Australia, use "Australia/Sydney" or some other timezone in Australia. Note that DST is opposite in the northern and souther hemispheres.) | | DYNAMICASSIGNMENT_BATCHES | Enables texter strategies for campaigns. Enabled by default are "finished-replies-tz", "vetted-texters", and "finished-replies". Learn more at [HOWTO-use-dynamicassignment-batches.md](https://github.com/StateVoicesNational/Spoke/blob/e217a971f0e1eed6f96d1494aee0f62ce715a771/docs/HOWTO-use-dynamicassignment-batches.md#dynamic-assignment-strategies). NOTE: "vetted-takeconversations" is experimental and does not work on its own, needing other three default strategies enabled. diff --git a/src/components/AssignmentTexter/Controls.jsx b/src/components/AssignmentTexter/Controls.jsx index 3374c3884..dec3d6031 100644 --- a/src/components/AssignmentTexter/Controls.jsx +++ b/src/components/AssignmentTexter/Controls.jsx @@ -1173,6 +1173,12 @@ export class AssignmentTexterContactControls extends React.Component { renderFirstMessage(enabledSideboxes) { const { contact } = this.props; + if (window.DOWNTIME_NO_INITIAL) { + return [ + this.renderToolbar(enabledSideboxes), +
Sending initial messages is currently paused. You can still reply to any incoming messages.
+ ]; + } return [ this.renderToolbar(enabledSideboxes),