~singpolyma/sgx-jmp

ref: 045da39f25b74034e7bba44cb5f1db48a935ba84 sgx-jmp/config.dhall.sample -rw-r--r-- 1.7 KiB
Customer Info

This should allow us, the admins, to query information about a customer
without having to dive in and run a couple redis queries and some
database queries before getting the full picture of who we're talking
to.

It also allows the users to request some data about themselves. Balance and
phone number are already visible in other places, but their expiry is currently
not, and people have been asking about it.
Check config against schema when loading

So we know very quickly why it's not working.
Merge branch 'low-balance-auto-top-up'

* low-balance-auto-top-up:
  Some people have exactly 5 who don't need to be told
  On low balance, top-up or notify
  ExpiringLock helper
On low balance, top-up or notify

On start up, check for users with low balance and NOTIFY about them.  LISTEN for
such notifications and process by either sending a low-balance warning message
or else attempting an auto-top-up as configured.

Using NOTIFY/LISTEN because then we can NOTIFY after any INSERT that leaves the
balance too low (using a trigger).  Doing the sync on start-up in case we missed
a NOTIFY during any downtime.  Using the Redis lock to prevent spamming a
low-balance user in case of many restarts or if they have many small
transactions happen in one day.
Ask electrum to notify on new BTC addresses

Otherwise we won't know when someone has paid...
Set location (API calls it "SipPeer") on new TN orders
Notify admin if a user goes over 500 messages in 30 days

Notify only once per day (using expiring redis key).
Can notify MUC or user, always sends directed presence first so it will join MUC
if not joined.
Ignore all messages direct to the component, mostly to throw out live messages
from MUC if we join that to notify.
Alt top up command

To show mailing address, eTransfer address, Bitcoin addresses, and allow
generating a new Bitcoin address.
Add plans and electrum structure to example
Reply to extdisco with sip server
fix config sample syntax
Merge branch 'create-reset-sip-account'

* create-reset-sip-account:
  Create or reset SIP account
  Factor out Catapult connection
Create or reset SIP account

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.
Disco info with XEP-0157

Allows us to advertise support address, for eventual inclusion in Cheogram adhoc
bot help output.
Merge branch 'web-register-start'

* web-register-start:
  Hidden command to allow jmp-register to start a web registration
Hidden command to allow jmp-register to start a web registration

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.
Merge branch 'import-to-catapult'

* import-to-catapult:
  Import newly-purchased numbers to Catapult
Import newly-purchased numbers to Catapult

Since we still use Catapult ("v1") for voice application, we need to import all
numbers there and set their applicationId to match.
Merge branch 'new-signup-add-credit-card'

* 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
Next