support multiple channels
Value Statement
AS A maintainer of signal-blaster
- I WANT to be able to add new channels to the same instance of the app while it is running
- SO THAT I can test the app on a different channel than the one being used in the field
- AND SO THAT I can quickly add new groups/users without having to redeploy the app
Acceptance Criteria
GIVEN a set of channels (each with a unique phone number and list of admins) stored in the DB
- WHEN the application starts up
- THEN it will start a separate process for each channel each listening for Signal messages to that channel's phone number and relaying messages from its admins to its members
GIVEN the above
- WHEN a maintainer submits a properly formatted, authenticated payload to
/channels/new
- THEN a new channel (and appropriate join records) will be created in the database
- AND THEN a new process will be started to listen for messages on that channel
Implementation Details
- for API authentication: check for random 40-digit hex string in payload (simple token) <-- ask homies if this is good enough
- payload should look roughly like:
{
"authToken": "0xED7E8B209A4CC8889A7A2C5F561389EE46F53562",
"channel": "+15555555555",
"admins": [
"+12222222222",
"+13333333333"
]
}
Edited by aguestuser