🔔 feat: Add subscription-aware quota notifications and update UI copy
Routes quota alerts through a subscription-specific check when billing from subscriptions, preventing wallet-based thresholds from triggering false warnings. Updates the notification settings description and localization keys to clarify that both wallet and subscription balances are monitored.
This commit is contained in:
@@ -58,9 +58,13 @@ func SettleBilling(ctx *gin.Context, relayInfo *relaycommon.RelayInfo, actualQuo
|
||||
return err
|
||||
}
|
||||
|
||||
// 发送额度通知
|
||||
// 发送额度通知(订阅计费使用订阅剩余额度)
|
||||
if actualQuota != 0 {
|
||||
checkAndSendQuotaNotify(relayInfo, actualQuota-preConsumed, preConsumed)
|
||||
if relayInfo.BillingSource == BillingSourceSubscription {
|
||||
checkAndSendSubscriptionQuotaNotify(relayInfo)
|
||||
} else {
|
||||
checkAndSendQuotaNotify(relayInfo, actualQuota-preConsumed, preConsumed)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user