automate channel creation

context

  • in order to limit the flow of new channel creation (and thus overloading our servers if that flow grew too large), we currently process channel creation requests manually from messages submitted to BOOST IT
  • although these messages disappear, it still leaves admin phone numbers and channel names temporarily on maintainer's phones in a way that we could be legally compelled to preserve. it also leaks information to us that we would rather not know!
  • it also sometimes causes users to wait hours or days for a new channel if they message us in the evening or on a weekend (which they inevitably do)
  • so: let's automate the process of channel creation, with some backups in place to alert in case of overuse of channel resources

behavior

happy path

request command

GIVEN a signalboost instance with a BOOSTIT channel

  • WHEN anyone sends REQUEST
  • THEN they will receive the following message:
Hi there! Want to create a Signalboost channel? 

Signalboost is a technology that allows you to send broadcasts and receive hotline messages without revealing your phone number to recipients.

This means you trust us to be good stewards of the phone numbers of everyone who uses your channel:
https://signalboost.info/privacy 

Now, if you'd like to create a channel, send CHANNEL followed by a comma-separated list of the admin phone numbers for that channel, for example:

CHANNEL +1555123412, +1555123419

channel command

GIVEN a signalboost instance with a BOOSTIT channel

  • WHEN a rando | subscriber | admin sends CHANNEL +1222333444,+14443332222 to BOOST IT where the phone numbers comma-separated list of valid e164-formatted phone numbers
  • THEN the system will create a new channel and make the phone numbers in the comma-separated list its admins
  • AND THEN BOOSTIT will respond with the following welcome message:
Your Signalboost channel has been created! In a moment, you should receive a welcome message from your channel phone number:
+15551111234.

If you have questions are have issues accessing your channel, you can message Signalboost support here.
  • AND THEN the system will send the admins a welcome message from their new channel number:
Welcome! You were just made an admin of this Signalboost channel by ${addingAdmin}. 

1. Add this phone number (${channelPhoneNumber}) to your contacts. 
2. Send HELP to see what commands you can use.
3. Send INFO to see how many admins and subscribers are on this channel.
4. Check out the following resources:
- https://signalboost.info/how-to
- https://www.instagram.com/_signalboost/
- https://signalboost.info/privacy/

p.s. It costs us ~$3/month to run each channel. Since we make this software for liberation, not profit, we rely on the material support of our community to keep the project afloat. If you can afford to, please consider making a donation here: https://signalboost.info/donate 💸
  • AND THEN the system will send the instance maintainers a notification on BOOSTIT:
A new channel was just created. There are now `123` active channels.

maintainers using the BOOST cli

  • GIVEN a system with maintainers alice and bob
  • AND GIVEN a phone number reserve size of 8, and 10 provisioned phone numbers
  • WHEN alice issues boost create-channel -p +1252221234 -a +11232225555,+12223334444
  • THEN she receives a success status and phone number
  • AND THEN the system will send the instance maintainers a notification on BOOSTIT:
A new channel was just created. There are now `123` active channels.

sad path

invalid CHANNEL command

WHEN someone sends CHANNEL to a channel that is not BOOSTIT

  • IF sender is subscriber/rando and hotline messages ON, treat it like a hotline message
  • IF sender is subscriber/rando and hotline messages OFF, give generic "didn't understand" error message
  • IF sender is admin, give "you didn't give a command" message

WHEN someone sends CHANNEL ABC to BOOSTIT

  • THEN they get sent a message that says: 'ABC' is not a valid phone number. Phone numbers must include country codes prefixed by a '+'.

invalid REQUEST command

WHEN someone sends REQUEST for supplies to a channel that is not BOOSTIT

  • THEN their message should be treated as a hotline message and forwarded to admins

WHEN someone issues `REQUEST for supplies' on BOOST IT

  • IF sender is subscriber/rando and hotline messages ON, treat it like a hotline message
  • IF sender is subscriber/rando and hotline messages OFF, give generic "didn't understand" error message
  • IF sender is admin, give "you didn't give a command" message

invalid CHANNEL request on BOOSTIT

GIVEN a signalboost instance with a signup channel

  • WHEN the signup channel receives a message starting with CHANNEL that is not followed by a comma-separated list of e164 phone numbers
  • THEN it will reply with a helpful error message explaining how to format a signup request

low amount of verified phone numbers

  • GIVEN a system with maintainers alice and bob
  • AND GIVEN a phone number reserve size of 8, and 8 provisioned phone numbers
  • WHEN alice issues boost create-channel -a +11232225555,+12223334444
  • THEN she receives a success status and phone number
  • AND THEN the system will send the instance maintainers a notification on DIAGNOSTICS:
New channel created.  
- `7` available phone numbers 
- `123` active channels 

no verified phone numbers

  • GIVEN a system with maintainers alice and bob
  • AND GIVEN a phone number reserve size of 8, and 0 provisioned phone numbers
  • WHEN alice issues boost create-channel -a +11232225555,+12223334444
  • THEN she receives a message that says Sorry, Signalboost is not accepting new channel requests at the moment. Please check again later.
  • AND THEN the system will send the instance maintainers a notification on DIAGNOSTICS:
Channel creation failed.
- `0` available phone numbers   
- `123` active channels 

user-facing docs

WHEN a user visits the help page of the splash site

  • THEN they will see text explaining how to use REQUEST

archived

note: because we must now provision #s with CAPTCHA's, we can no longer automatically reprovision phone #425 (closed)

automatic phone number (re)provisioning

  • GIVEN a system with 8 VERIFIED phone numbers
  • WHEN someone successfully registers a new channel and thus uses one of those VERIFIED phone numbers
  • THEN when a maintainer issues boost list channels they should see 8 phone numbers

automatic phone number (re)provisioning

GIVEN a GIVEN a system with 8 VERIFIED phone numbers

  • WHEN a rando sends a valid signup message to the signup channel
  • AND THEN there is an issue provisioning a new phone number
  • THEN the sysadmins receive a message via the support channel saying:
Error provisioning a new phone number for channel request: `err message here`
  • AND THEN the sender receives a response saying:
Sorry, there was an issue while processing your request. Please try again later.
Edited by Mari