Commit log

51121d1 Merge branch 'wording'

Click to expand commit body
* wording:
  Update instructions to be closer to what is in current web signup

Stephen Paul Weber created

d40dfe0 Disco info with XEP-0157

Click to expand commit body
Allows us to advertise support address, for eventual inclusion in Cheogram adhoc
bot help output.

Stephen Paul Weber created

6100ac7 Update instructions to be closer to what is in current web signup

Stephen Paul Weber created

c85df3f Reply to old bot address

Click to expand commit body
Keep this deprecation message in so that users with this still in roster know
where bot has moved.

Stephen Paul Weber created

35c6016 Merge branch 'pass-messages'

Click to expand commit body
* pass-messages:
  Pass messages to and from the SGX

Stephen Paul Weber created

9fcf88e Merge branch 'web-register-start'

Click to expand commit body
* 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.

Stephen Paul Weber created

5208fbd fix ci

Stephen Paul Weber created

48ce76d Pass messages to and from the SGX

Click to expand commit body
Rewriting the from/to as appropriate.

Stephen Paul Weber created

a0bb2b9 Set execting status properly

Stephen Paul Weber created

3c79805 ergonomics for testing credit card

Stephen Paul Weber created

94bb851 Merge branch 'create_customer_id'

Click to expand commit body
* create_customer_id:
  Create customer_id if it does not exist before we start registration
  Break out CustomerPlan
  Inject BackendSgx per customer

Stephen Paul Weber created

a3f4e27 Create customer_id if it does not exist before we start registration

Stephen Paul Weber created

dabca13 Break out CustomerPlan

Click to expand commit body
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.

Stephen Paul Weber created

e5b1edb Inject BackendSgx per customer

Click to expand commit body
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.

Stephen Paul Weber created

829a57b Merge branch 'invites'

Click to expand commit body
* invites:
  Block repeated invite code tries by customer id
  Allow user to activate using invite code

Stephen Paul Weber created

e2b5bdf Block repeated invite code tries by customer id

Click to expand commit body
So it's not as trivial to brute-force the space and find an open one. Limit is
10 tries per hour.

Stephen Paul Weber created

9a30233 Allow user to activate using invite code

Click to expand commit body
Checks if the code is available and marks it used, then activates. Tracks who
invited and who used in the table for later reward or punishment.

Stephen Paul Weber created

8b93d5a Fix for credit card flow

Stephen Paul Weber created

3b4e787 Merge branch 'set-forwarding-on-finish'

Click to expand commit body
* set-forwarding-on-finish:
  Configure number for inbound calls

Stephen Paul Weber created

3b07712 Fixed code to expect 201 but forgot to update tests

Stephen Paul Weber created

f7efec3 Merge branch 'import-to-catapult'

Click to expand commit body
* import-to-catapult:
  Import newly-purchased numbers to Catapult

Stephen Paul Weber created

6fb4b01 Merge branch 'show-ratecenter-during-signup'

Click to expand commit body
* show-ratecenter-during-signup:
  Show rate center during signup

Stephen Paul Weber created

9401086 Merge branch 'activated-users-to-finish'

Click to expand commit body
* activated-users-to-finish:
  Test that registered users get the Registered step
  Already activated user goes straight to finish

Stephen Paul Weber created

56403f9 Show rate center during signup

Click to expand commit body
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.

Stephen Paul Weber created

eecf454 Configure number for inbound calls

Click to expand commit body
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.

Stephen Paul Weber created

c69a621 Merge branch 'new-signup-credit-card-decline'

Click to expand commit body
* new-signup-credit-card-decline:
  Block repeated declines for 24 hours
  Handle credit card decline

Stephen Paul Weber created

4f0083d Block repeated declines for 24 hours

Stephen Paul Weber created

b0094db Handle credit card decline

Click to expand commit body
Show user error on decline and give the chance to pick another card.

Stephen Paul Weber created

221f4dc Merge branch 'new-signup-add-credit-card'

Click to expand commit body
* 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

Stephen Paul Weber created

8e4c1cc Happy path for credit card signup

Click to expand commit body
Assuming credit card payment works, you can now activate a new account by paying
with one.

Stephen Paul Weber created

7f1efc3 Panic should work on any value for error

Stephen Paul Weber created

35f09f1 Allow getting default payment method, not just index

Stephen Paul Weber created

678283b Object representing the backend SGX to use

Click to expand commit body
This is what should know about things like the customer id -> jid mapping, etc.

Stephen Paul Weber created

93919ac Stop polluting Object namespace with Blather DSL

Stephen Paul Weber created

946b50d Work in the presence of em-synchrony

Click to expand commit body
em-synchrony monkeypatches em-http when loaded. The old functionality is still
present, but under different method names.

Stephen Paul Weber created

210ab8c Helper to allow ordering phone number from Bandwidth v2

Click to expand commit body
Uses their gem which uses Faraday. Set Faraday to em-synchrony so their gem is
now using EventMachine but still sync so their code will work unchanged.  Wrap
all uses of the gem in EM.promise_fiber to get a promise back out of that.

Implement a poll helper that can wait until a new order is complete at Bandwidth
before continuing.  They support an HTTP callback method, but only global on
account? This is much easier to work with in our context.

Stephen Paul Weber created

2701f96 Helper to get a promise that resolves after N seconds

Stephen Paul Weber created

82bf4d3 Every payment kind will need the plan, so put it at the top

Stephen Paul Weber created

1448fc7 Use registration pattern for Payment kinds

Click to expand commit body
Instead of a hard-coded case statement.

Stephen Paul Weber created

c08d6ea Method to bill the plan of a Customer

Click to expand commit body
Bills their balance for the cost of one month of plan.
Activates the plan by insert into plan_log, unless already active in which case
extends current plan by one month.

Stephen Paul Weber created

e956460 Use Forwardable for simple delegations

Stephen Paul Weber created

3a0f5bf Helper to allow using sync-style code in a Promise context

Click to expand commit body
This helper spins up a fiber and returns an unresolved EMPromise, then runs the
passed-in block inside the fiber and fulfills the promise with the result of the
block. Because nothing is looking for the Fiber to return it is free to act as a
trampoline for EMPromise#sync and other fiber-sync-style code that does not
block the EM reactor.

Stephen Paul Weber created

d1f8b6a New signup: go to web to choose credit card

Click to expand commit body
This step, if chosen, directs the user to the jmp-pay webapp to add a credit
card.  It includes an OOB element for use by user agents that can handle
that (possibly for webview embed, etc) with a note-based fallback as per XEP.
Once the user chooses "next" the code checks if they have actually added a card,
and if so continues to a yet-unimplemented step and if not repeats the
instruction to go to the web app.

Stephen Paul Weber created

c3795a6 OOB helper

Click to expand commit body
https://xmpp.org/extensions/xep-0066.html

Stephen Paul Weber created

9d3db6e Reject promise on stanza error

Stephen Paul Weber created

f699177 Fix typo

Click to expand commit body
This result variable got renamed to registered

Stephen Paul Weber created