Make it possible to save SMS support status on phone record

This commit is contained in:
Eli Ribble 2026-04-13 22:07:56 +00:00
parent 96878f24de
commit 9c557a0391
No known key found for this signature in database
14 changed files with 135 additions and 54 deletions

View file

@ -20,8 +20,9 @@ func EnsureInDB(ctx context.Context, txn bob.Executor, dst types.E164) (err erro
}
func ensureInDB(ctx context.Context, txn bob.Executor, destination string) (err error) {
_, err = psql.Insert(
im.Into("comms.phone", "e164", "is_subscribed", "status"),
im.Into("comms.phone", "can_sms", "e164", "is_subscribed", "status"),
im.Values(
psql.Arg(true),
psql.Arg(destination),
psql.Arg(false),
psql.Arg("unconfirmed"),