This is not a permanent solution, but for now it will allow Bitcoin flow users
to get the same message from the cronjob that legacy web flow users get, and
thus complete their signup using the legacy web flow.
Eventually we'll want to reverse this and direct every Bitcoin activation via a
new end flow.
Stephen Paul Weber
created
0693d5a
No tel picker yet, so just go to the webpage
Click to expand commit body
Direct users to the homepage if they haven't selected a tel yet. Not what we
want eventually, but better than crashing.
New command to create or reset SIP account. Always try create first because
it's faster and more common, fall back to search the list for our account if
that fails due to conflict. Password is always randomly generated from the
mnemonicode word list.
Customer has a CustomerUsage which can fetch data to build a UsageReport
which returns a jabber:x:data form "table" as per spec for per-day in
the last month.
Minutes come from cdr table in postgresql.
Messages come from redis.
Stephen Paul Weber
created
51897c8
Catch more exception in web-register command and send user to sentry
add_to_form no longer needs a promise or a network call, instead we use
a factory to get that data up front and inject the dependency.
New BuyAccountCreditForm#parse to get the relevant data back out of an
XMPP form.
Some changes to Transaction and sgx_jmp.rb to use the new method
semantics.
* count-outbound-messages:
Store customer outbound messages/day for 1 year in redis
Stephen Paul Weber
created
bc13638
Store customer outbound messages/day for 1 year in redis
Click to expand commit body
Storage is a sorted set, with dates as the values and message counts as the
scores. Use zincrby to increment the message count by 1 on each new message.
Use zremrangebylex to remove all items older than 1 year so the set does not
grow unboundedly.
Dates with known message counts can be found using zrangebylex. Scores can be
had one at a time with zscore. In redis 6.2+ zrange bylex withscores or zmscore
may also be used, but that is only in Debian experimental at time of writing.
* web-register-start:
Hidden command to allow jmp-register to start a web registration
Stephen Paul Weber
created
a35d429
Hidden command to allow jmp-register to start a web registration
Click to expand commit body
This is the command jmp-register will use to tell use a certain claimed JID
wants a certain tel. We relay that to cheogram and save in web_register_manager
the tel associated with the JID cheogram assigns to the target.
We had Plan and Customer but the relationship between the two lived
entirely in Customer, which was growing quite large. Break that
relationship out into its own concept and give it a name.
Instead of being a singleton that represents the entire relationship
with the backend, the object is now per-customer (since any meaningful
method requires a customer anyway for the from JID at least) and can be
delegated to directly from Customer.
Fetch from bandwidth so we can show it to the user, in case they happen to care.
Stephen Paul Weber
created
f4ece3c
Test that registered users get the Registered step
Stephen Paul Weber
created
56ce853
Already activated user goes straight to finish
Click to expand commit body
If not registered, but activated, they must have paid but failed to get their
number setup. Maybe the number was already taken. Maybe they paid manually. In
any case we can skip all intervening steps and go straight to buying and
configuring their number for them.
Stephen Paul Weber
created
0dfe909
Import newly-purchased numbers to Catapult
Click to expand commit body
Since we still use Catapult ("v1") for voice application, we need to import all
numbers there and set their applicationId to match.
Adds the settings to redis that jmp-fwdcalls will use to route inbound calls.
Not done by the sgx registration even though fwdcalls is currently a plug-over,
and of course won't be once fwdcalls dies so do it here.
* new-signup-add-credit-card:
Happy path for credit card signup
Panic should work on any value for error
Allow getting default payment method, not just index
Object representing the backend SGX to use
Stop polluting Object namespace with Blather DSL
Work in the presence of em-synchrony
Helper to allow ordering phone number from Bandwidth v2
Helper to get a promise that resolves after N seconds
Every payment kind will need the plan, so put it at the top
Use registration pattern for Payment kinds
Method to bill the plan of a Customer
Use Forwardable for simple delegations
Helper to allow using sync-style code in a Promise context
New signup: go to web to choose credit card
OOB helper
Reject promise on stanza error
Fix typo