fix: save profile after OTP verification

This commit is contained in:
klockky
2026-07-06 19:12:33 +03:00
parent e1c9d2584f
commit 39be1fc9c2
+7
View File
@@ -180,6 +180,13 @@ class AccountModule {
final accountId = result.accountId;
if (sessionToken != null && accountId != null) {
final profileMap = data['profile'];
if (profileMap is Map) {
final profile = ProfileData.fromServerProfile(
profileMap.cast<dynamic, dynamic>(),
);
await AppDatabase.saveProfile(profile, isActive: true);
}
await TokenStorage.saveToken(sessionToken, accountId);
await TokenStorage.setActiveAccount(accountId);
await SpoofingService.commitPendingSpoof(accountId);