Disconnect Number on Swap
I decided that when undoing this action I shouldn't delete the new
number automatically, and when redoing I probably shouldn't re-delete
the new number.
This situations are weird, and so the human should probably think
criticially here.
So what I do instead is only delete the number the first time the action
gets run, and then in the other two cases I warn the operator that I
didn't delete anything so they can go figure stuff out.
I put this `first_time?` logic in the parent because I already know of
another place where I'm planning on using it in a different PR.
Fix Whitespace
I'm going to make changes to this file at some point, but while I was in
here I noticed the whitespace was a bit weird.
So this change is only whitespace, no logic.
Merge branch '3ds-tx'
* 3ds-tx:
Privacy.com doesn't even like us anymore
3DS first transaction
Privacy.com doesn't even like us anymore
3DS first transaction
Use the new with-amount jmp pay and when they click next check their balance
before we charge them, if they did make a transaction already then we can
proceed to BillPlan.
Porting Zips Can Contain "-"
I use presence of only numerals to guess if a port is Canadian or not.
Today we got a Zip+4, which has a dash. Right... that...
SIM nicknames feature
Added columns to the eSIMs command to now display the nickname of a SIM,
if set.
Added test for the new columns in sim_repo.
Added nicknames column to sims form, and modified to a multiline form.
Don't Count Stanzas Without Body as Reached
We get messages without bodies from time to time as things like delivery
receipts.
These are great, and we don't want to forward them to the end-user for
sure if we're dealing with a reachable number, but we also don't want to
count it as a message that reached us.
It's a receipt for a thing I did, not a thing the tester did.
Reachability Command
This creates the keys that the previous commits use, and also reports
their current values.
It's a pretty sparse command in terms of UX, but only admins will use it
so I kept it simple.
This also optionally sends the prompt to one of the chosen reachability
numbers. It's optional so a human running the command can query the
result without looking in redis, but also without spamming their phone
with another message.
Track Call Reachability
This intercepts calls that are from the reachability numbers and checks
their status.
I had to extend the reachability repo a bit because I realized that
unlike texts which I just want to do nothing when they're intercepted,
for calls I actually have to _return_ something in that case.
Due to my short-circuit none of the existing tests needed to be changed,
because the calls weren't coming from a reachability number. But then I
added two more tests, one to make sure a call from the reachability
number works normally if reachability is not being tested for that user,
and another that verifies that if we're testing reachability it hangs up
and increments the counter, which is the actual point of this patch.
SMS Reachability Check
On an inbound stanza it checks if the initiator is one of the
whitelisted numbers that can perform reachability checks. If not, which
virtually all received SMSs won't be, it just runs the code that was
already there.
If it is, then it does a further check to see if the reachability check
is ongoing for this user, and if not it runs the code that was already
there.
And finally, if the key exists it increments it and otherwise doesn't
process the message.
JID cannot contain whitespace
Put Chatwoot Link in Admin Info (and link to new JID)
We made a change with the "direct_targets" that made it so support no
longer talks to phone numbers, but customer_blah@sgx.example.com
So, we no longer need to link to the phone number version of the jid,
but we now have this new one.
And while we're at it we also have a ticketing system that's based on
that same JID, so I'll make a link to that too.
Merge branch 'feature_flags'
* feature_flags:
Put CDRs behind a feature flag
Store feature flags on user for limiting commands, etc
Added a New Command to Display CDRs to Customers
Put CDRs behind a feature flag
Store feature flags on user for limiting commands, etc
Added a New Command to Display CDRs to Customers
Created cdr_repo and now call it from a new command in the Bot, then filter the response through a form to display for the customer.
Refactored some aspects of lib/cdr.rb.