Skip to content

[#305] Resolve "invite new channel admins to subscribe to TF announce channel"

Closes #305 (closed)

Context

  • we would like to be able to tell admins about new features they might want to use
  • we also want to respect people's ability to consent to receiving communications from us
  • so: when people create a channel, invite them to subscribe to the support channel IFF a support channel exists on the given signalboost instance AND they are not already subscribed to it

Changes

  • add registrar.channel._inviteToSupportChannel:

    • in registrar.channel.create, check to see if there is a support channel, if so..
    • invite all new channel admins to subscribe to the support channel (unless they are already members)
  • GOTCHA protection: strip extraneous strings in suport chan env var

    • it is super easy to assume that the SIGNALBOOST_SUPPORT_NUMBER env var string should be surrounded by quotes (because strings usually are!)
    • however, if a dev provides quotes around the number, the quote characters will be interpreted literally, causing the support channel phone number to have 2 extra characters and not be a valid e164 phone number
    • to avoid this, strip quotation marks from the env var variable when using it to assign to supportPhoneNumber in app.config.signal
    • additionally: strip quote marks from example support channel env var in .env.dev.gpg to avoid misleading future devs!

Merge request reports