Fix import: infer phone when missing

This commit is contained in:
meoacgx committed 2026-01-06 16:48:13 +08:00
1 parent 59e39789a3
commit 98343906f9
2 files changed
+22 -3

No files matched your search

+8 -2
View File
@@ -72,8 +72,14 @@ if (args.Length >= 2 && string.Equals(args[0], "--diag-session-dir", StringCompa
if (!TryGetString(root, out var phone, "phone") || string.IsNullOrWhiteSpace(phone))
{
Console.WriteLine($"[FAIL] {Path.GetFileName(jsonPath)}: 缺少 phone");
continue;
if (!TryGetString(root, out phone, "session_file", "sessionFile") || string.IsNullOrWhiteSpace(phone))
phone = Path.GetFileNameWithoutExtension(jsonPath);
if (string.IsNullOrWhiteSpace(phone))
{
Console.WriteLine($"[FAIL] {Path.GetFileName(jsonPath)}: 缺少 phone");
continue;
}
}
_ = TryGetLong(root, out var userId, "user_id", "uid");