Usage command
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.
Catch more exception in web-register command and send user to sentry
Add Sentry
Capture in #panic and a few other places, add customer and route context
as well as some initial breadcrumbs in the register command.
Add missing require
To allow these modules to be used in isolation (especially when
testing).
Refactor BuyAccountCreditForm
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.
Merge branch 'count-outbound-messages'
* count-outbound-messages:
Store customer outbound messages/day for 1 year in redis
Store customer outbound messages/day for 1 year in redis
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.
Merge branch 'wording'
* wording:
Update instructions to be closer to what is in current web signup
Disco info with XEP-0157
Allows us to advertise support address, for eventual inclusion in Cheogram adhoc
bot help output.
Update instructions to be closer to what is in current web signup
Reply to old bot address
Keep this deprecation message in so that users with this still in roster know
where bot has moved.
Merge branch 'pass-messages'
* pass-messages:
Pass messages to and from the SGX
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.
Pass messages to and from the SGX
Rewriting the from/to as appropriate.
Set execting status properly
ergonomics for testing credit card
Merge branch 'create_customer_id'
* create_customer_id:
Create customer_id if it does not exist before we start registration
Break out CustomerPlan
Inject BackendSgx per customer
Create customer_id if it does not exist before we start registration