Skip to content

Commit 715ab46

Browse files
authored
Merge pull request #2499 from StateVoicesNational/stage-main-14.1.2
Stage main 14.1.2
2 parents 7ce0e22 + 149d1ae commit 715ab46

File tree

20 files changed

+2768
-3526
lines changed

20 files changed

+2768
-3526
lines changed

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ version: 2
22
updates:
33
- package-ecosystem: "npm"
44
directory: "/"
5-
target-branch: "stage-main-14.1"
5+
target-branch: "stage-main-14.2"
66
schedule:
77
interval: "weekly"
88
day: "monday"
99
time: "12:00"
1010
rebase-strategy: auto
1111
open-pull-requests-limit: 10
1212
labels:
13-
- "A-dependencies"
13+
- "A-dependencies"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Want to know more?
2323

2424
This version of Spoke suitable for testing and, potentially, for small campaigns. This won't cost any money and will not support production(aka large-scale) usage. It's a great way to practice deploying Spoke or see it in action.
2525

26-
<a href="https://heroku.com/deploy?template=https://github.com/StateVoicesNational/Spoke/tree/v14.1.1">
26+
<a href="https://heroku.com/deploy?template=https://github.com/StateVoicesNational/Spoke/tree/v14.1.2">
2727

2828
<img src="https://www.herokucdn.com/deploy/button.svg" alt="Deploy">
2929
</a>

app.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@
183183
}
184184
},
185185
"addons": [
186-
"heroku-postgresql:basic",
186+
"heroku-postgresql:essential-0",
187187
{
188188
"plan": "heroku-redis:mini",
189189
"options": {

docs/HOWTO_USE_POSTGRESQL.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,19 @@
33
To use Postgresql, follow these steps:
44

55
1. Either install docker (recommended) or postgresql on your machine:
6-
* If you installed docker run the database using: `docker compose up`
7-
* If you installed postgres locally, create the spoke dev database: `psql -c "create database spokedev;"`
8-
* Then create a spoke user to connect to the database with `createuser -P spoke` with password "spoke" (to match the credentials in the .env.example file)
6+
* If you installed docker run the database using: `docker-compose up`
7+
* If you installed postgres locally (or if you already have a local installation of postgres), create the spoke dev database: `psql -c "create database spokedev;"`
8+
* Then create a spoke user to connect to the database with `psql -d spokedev -c "create user spoke with password 'spoke';"` (to match the credentials in the .env.example file)
9+
* Grant permissions to the new Spoke user:
10+
* `psql -d spokedev -c "GRANT ALL PRIVILEGES ON DATABASE spokedev TO spoke;"`
11+
* `psql -d spokedev -c "GRANT ALL PRIVILEGES ON schema public TO spoke;"`
12+
* Create a test database by running the following commands:
13+
```
14+
psql -d spokedev
15+
CREATE DATABASE spoke_test;
16+
CREATE USER spoke_test WITH PASSWORD 'spoke_test';
17+
GRANT ALL PRIVILEGES ON DATABASE spoke_test TO spoke_test;
18+
```
919
1. In `.env` set `DB_TYPE=pg`. (Otherwise, you will use sqlite.)
1020
2. Set `DB_PORT=5432`, which is the default port for Postgres.
1121

docs/REFERENCE-environment_variables.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
| DEV_APP_PORT | Port for development Webpack server. Required for development. |
4141
| 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. |
4242
| 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 |
43+
| 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. |
4344
| 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. |
4445
| 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.) |
4546
| 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.

docs/RELEASE_NOTES.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
# Release Notes
22

3+
## 14.1.2
4+
5+
_October 2024_: Version 14.1.2
6+
7+
14.1.2 is a patch release.
8+
9+
### Bug Fixes
10+
11+
- [#2488](https://github.com/StateVoicesNational/Spoke/pull/2488) - Fix Redis and readonly DB certificate issues - @jeffm2001
12+
- [#2490](https://github.com/StateVoicesNational/Spoke/pull/2490) - Fix Bandwidth sending - @jeffm2001
13+
- [#2491](https://github.com/StateVoicesNational/Spoke/pull/2491) - Avoid error on opt-out - @jeffm2001
14+
- [#2493](https://github.com/StateVoicesNational/Spoke/pull/2493) - Fix broken docker image build - @engelhartrueben
15+
- [#2442](https://github.com/StateVoicesNational/Spoke/pull/2442) - Add instructions for local postgres - @sjwmoveon
16+
- [#2478](https://github.com/StateVoicesNational/Spoke/pull/2478) - Allow pausing of initial messages - @jeffm2001
17+
- [#2494](https://github.com/StateVoicesNational/Spoke/pull/2494) - Heroku Plan Update - @engelhartrueben
18+
- [#2498](https://github.com/StateVoicesNational/Spoke/pull/2498) - Remove unused variables causing /phone-numbers blank screen error for Admins - @mau11
19+
- [#2492](https://github.com/StateVoicesNational/Spoke/pull/2492) - Fix UserInputError GraphQL errors - @jeffm2001
20+
21+
### Appreciations
22+
23+
[Jeff Mann](https://github.com/jeffm2001), [Maureen Zitouni](https://github.com/mau11), [Ruby Engelhart](https://github.com/engelhartrueben), [Sophie Waldman](https://github.com/sjwmoveon)
24+
325
## 14.1.1
426

527
_October 2024_: Version 14.1.1

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "spoke",
3-
"version": "14.1.1",
3+
"version": "14.1.2",
44
"description": "Spoke",
55
"main": "src/server",
66
"engines": {
@@ -119,6 +119,7 @@
119119
"bandwidth-sdk": "^1.0.2",
120120
"body-parser": "^1.15.2",
121121
"browserify": "^17.0.0",
122+
"buffer": "^6.0.3",
122123
"color-difference": "^0.3.4",
123124
"cookie-session": "^2.1.0",
124125
"dataloader": "^2.2.2",

src/components/AssignmentTexter/Controls.jsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,6 +1173,12 @@ export class AssignmentTexterContactControls extends React.Component {
11731173

11741174
renderFirstMessage(enabledSideboxes) {
11751175
const { contact } = this.props;
1176+
if (window.DOWNTIME_NO_INITIAL) {
1177+
return [
1178+
this.renderToolbar(enabledSideboxes),
1179+
<div>Sending initial messages is currently paused. You can still reply to any incoming messages.</div>
1180+
];
1181+
}
11761182
return [
11771183
this.renderToolbar(enabledSideboxes),
11781184
<ContactToolbar

src/components/IncomingMessageFilter.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,8 @@ class IncomingMessageFilter extends Component {
412412
placeholder="Error code number"
413413
label="Error codes"
414414
value={this.state.errorCode}
415-
onChange={(_, errorCode) => {
415+
onChange={event => {
416+
const errorCode = event.target.value;
416417
this.setState({ errorCode });
417418
}}
418419
onKeyPress={evt => {

src/containers/AdminIncomingMessageList.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ export class AdminIncomingMessageList extends Component {
185185
handleErrorCodeChange = async errorCode => {
186186
const contactsFilter = {
187187
...this.state.contactsFilter,
188-
errorCode: errorCode ? errorCode.split(",") : null
188+
errorCode: errorCode ? errorCode.split(",").map(Number) : null
189189
};
190190
await this.setState({
191191
contactsFilter,
@@ -234,7 +234,7 @@ export class AdminIncomingMessageList extends Component {
234234
handleReassignAllMatchingRequested = async newTexterUserId => {
235235
await this.props.mutations.bulkReassignCampaignContacts(
236236
this.props.params.organizationId,
237-
newTexterUserId,
237+
newTexterUserId.toString(),
238238
this.state.campaignsFilter || {},
239239
this.state.assignmentsFilter || {},
240240
this.state.contactsFilter || {},

0 commit comments

Comments
 (0)