add /deep-link/new-activity on the end of the URL in SMS texts

This commit is contained in:
2026-10-15 19:49:58 -06:00
parent cdd84643db
commit 0c67bfbc9b
5 changed files with 12 additions and 5 deletions
+2
View File
@@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Added
- Optional `MESSAGE_ENV_LABEL` appends ` (<label>)` to every SMS and push body, so a recipient can tell which server sent it; unset or blank appends nothing. `NODE_ENV` cannot serve, since the Docker image sets it to `production` on every server.
### Changed
- The SMS digest links to `https://giftopia.me/deep-link/new-activity` instead of the bare `https://giftopia.me`.
### Changed in DB or environment
- `MESSAGE_ENV_LABEL` (see above) on test environment
+3 -2
View File
@@ -541,10 +541,11 @@ everywhere, so no existing call site or test changes.
"already texted today" flag is needed.
- Recipients: `sms_registrations` rows for the DID with `verified = 1`,
deduplicated by number.
- Body: `Gift Economies: you have N new updates. https://giftopia.me` plus
- Body: `Gift Economies: you have N new updates. https://giftopia.me/deep-link/new-activity` plus
`Reply STOP to end.` Kept inside 160 GSM-7 characters — a second segment is a
second charge for the privilege of a longer sentence. The link is
`https://giftopia.me`; `https://giftopia.tech` is the claim `@context`
the app's `https://giftopia.me/deep-link/new-activity` deep link;
`https://giftopia.tech` is the claim `@context`
namespace and never appears in a message.
- Each send writes `alert-sent` or `alert-send-failed` to `sms_phone_log` with
the provider message id. Send failures are logged and do not roll back cursor
+1 -1
View File
@@ -405,7 +405,7 @@ second replica double-texts.
Eligibility is the same predicate the FCM path uses: the run consumed today's
JWT and the digest is complete with updates. Consumption is what makes later
ticks on the same UTC day no-ops. The message is
`Gift Economies: you have N new updates. https://giftopia.me Reply STOP to end.`,
`Gift Economies: you have N new updates. https://giftopia.me/deep-link/new-activity Reply STOP to end.`,
kept inside one 160-character GSM-7 segment, since a second segment is a second
charge. Underneath the JWT rule, an `sms_phone_log` count caps sends at one per
handset per identity per UTC calendar day. Send failures are logged and do not roll back
+5 -2
View File
@@ -16,8 +16,11 @@ import { hashPhoneNumber } from "../util/smsVerificationCode.js";
import type { DailyAlertSearchResult } from "./daily.js";
import { log } from "../util/log.js";
/** The app link. giftopia.tech is the claim namespace and never appears in a message. */
export const ALERT_SEARCH_SMS_LINK = "https://giftopia.me";
/**
* The app's new-activity deep link. giftopia.tech is the claim namespace and
* never appears in a message.
*/
export const ALERT_SEARCH_SMS_LINK = "https://giftopia.me/deep-link/new-activity";
/** One GSM-7 segment. A second segment is a second charge for a longer sentence. */
export const SMS_SINGLE_SEGMENT_LIMIT = 160;
+1
View File
@@ -128,6 +128,7 @@ describe("alertSearchSmsBody", () => {
alertSearchSmsBody(1),
`Gift Economies: you have 1 new update. ${ALERT_SEARCH_SMS_LINK} Reply STOP to end.`
);
assert.ok(body.includes("https://giftopia.me/deep-link/new-activity "));
assert.equal(body.includes("giftopia.tech"), false);
});
});