collab: Push down plan changes to the client (#30447)

This PR makes it so we push down plan updates from the server when the
user's subscription changes.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2025-05-09 20:08:48 -04:00 committed by GitHub
parent 79ba22673b
commit daa777440d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 143 additions and 111 deletions

View file

@ -1137,6 +1137,12 @@ async fn handle_customer_subscription_event(
.await?;
}
// When the user's subscription changes, push down any changes to their plan.
rpc_server
.update_plan_for_user(billing_customer.user_id)
.await
.trace_err();
// When the user's subscription changes, we want to refresh their LLM tokens
// to either grant/revoke access.
rpc_server