mirror of
https://github.com/zhom/donutbrowser.git
synced 2026-10-21 06:51:24 +02:00
feat: send account plan
This commit is contained in:
1 parent
58b0febe42
commit
99414bdcc4
1 file changed
+9
@@ -3234,6 +3234,15 @@ impl WayfernManager {
|
||||
result_file,
|
||||
account_known,
|
||||
));
|
||||
// The plan of the signed-in account, as this app knows it.
|
||||
if let Some(auth) = crate::cloud_auth::CLOUD_AUTH.get_user().await {
|
||||
let plan = if auth.user.entitlements().active {
|
||||
auth.user.effective_plan().to_string()
|
||||
} else {
|
||||
"free".to_string()
|
||||
};
|
||||
document.insert("accountPlan".to_string(), json!(plan));
|
||||
}
|
||||
Some(serde_json::Value::Object(document))
|
||||
}
|
||||
None => identity_document.clone(),
|
||||
|
||||
Reference in new issue
Block a user