Skip to content

Feat/monthly bot message quota - #911

Merged
realcodesiman merged 2 commits into
mainfrom
feat/monthly-bot-message-quota
Aug 6, 2026
Merged

Feat/monthly bot message quota#911
realcodesiman merged 2 commits into
mainfrom
feat/monthly-bot-message-quota

Conversation

@realcodesiman

Copy link
Copy Markdown
Contributor

No description provided.

Adds `UserQuota.monthlyBotMessagesPeriodStart` (durable reset stamp,
unlike MAC's Redis-only stamp — bot messages have no reconcile ledger
to self-heal from) and `botMessagesTopUpGranted` (mirrors platform-db
top-up credits so they survive publishEntitlements' recomputes).

`sync-user-quota`'s reconcileUser now also reconciles the monthly
bot-message counter's billing-cycle reset, adopting unstamped rows
into the current period without zeroing prior usage.

Sends now emit `message:bot_sent` analytics for bot-sent messages in
send-message, send-messenger-template, and send-whatsapp-template —
previously the pre-send quota gate blocked bot sends but nothing
incremented the counter it gates against.

Proxies `/api/top-ups/*` from the builder to the portal, mirroring the
existing `/api/checkout/*` proxy for plan checkout.
Adds a "Top-up packs" sidebar entry to the reseller portal, gated
behind saasMode, with translations across all supported locales.
@realcodesiman
realcodesiman merged commit 2e692d4 into main Aug 6, 2026
7 checks passed
@realcodesiman
realcodesiman deleted the feat/monthly-bot-message-quota branch August 6, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant