File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1
1
import {
2
- getMostRecentSubscription ,
2
+ getCurrentActiveSubscription ,
3
3
getUserByMatrixUserId ,
4
4
spendCredits ,
5
5
} from '@cardstack/billing/billing-queries' ;
@@ -25,9 +25,9 @@ export async function saveUsageCost(
25
25
26
26
let user = await getUserByMatrixUserId ( pgAdapter , matrixUserId ) ;
27
27
28
- // This check is for transition period where we don't have subscriptions have the subscription flow fully rolled out.
28
+ // This check is for the transition period where we don't have subscriptions fully rolled out yet .
29
29
// When we have assurance that all users who use the bot have subscriptions, we can remove this subscription check.
30
- let subscription = await getMostRecentSubscription ( pgAdapter , user ! . id ) ;
30
+ let subscription = await getCurrentActiveSubscription ( pgAdapter , user ! . id ) ;
31
31
if ( ! subscription ) {
32
32
log . info (
33
33
`user ${ matrixUserId } has no subscription, skipping credit usage tracking` ,
You can’t perform that action at this time.
0 commit comments