[cleanup] grab-bag of misc cleanup tasks
This MR fixes some stray TODOs, borked unit tests and conditions that are less-than-friendly to friendos-of-friendos trying to run their own signalboost instances.
In particular it:
-
removes some stale TODOs
-
fixes some broken unit tests from !184 (merged)
-
modifies
ansible/provision.yml
to allow 3 failed auth attempts for ssh access to prod instead of 2 -
un-hardcodes ngrok subdomain in registrar configs (provide it as env var!)
- this makes it so friendos-of-friendos can't register numbers with twilio!
-
prevents crash on rate-limit error if there is no signup channel (since a signup channel might only exist on team-friendo's signalboost)
- context: we want to notify admins of the signup channel if there is a rate limit, but some signalboost instances that don't belong to team-friendo might not have signup channels!
- cause: we try to map over the memberships field of a channel that
doesn't exist (uh-oh! can't call
.map
onnull!
crash!) - fix: if there is no signup channel, just return early and don't notify, prevent calling the code that crashed
-
avoids reparsing phonenum from ADD/INVITE if reseting expiry
- context: it's sorta costly to reparse a command for a valid phone number, and unnecessary given we know it contained a valid phone number!
- instead: pass along the payload from every command into its command
result, and just pluck the payload off of the ADD/INVITE
commandResults in
dispatcher.messenger.setExpiryTimeForNewUsers