mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-06-28 08:07:16 -04:00
fix slow first message
This commit is contained in:
parent
6c4b803091
commit
b0d4e35c6f
9 changed files with 141 additions and 5 deletions
|
@ -168,7 +168,8 @@ class AccountRepository {
|
|||
/// Creates a new super identity, an identity instance, an account associated
|
||||
/// with the identity instance, stores the account in the identity key and
|
||||
/// then logs into that account with no password set at this time
|
||||
Future<void> createWithNewSuperIdentity(NewProfileSpec newProfileSpec) async {
|
||||
Future<SecretKey> createWithNewSuperIdentity(
|
||||
NewProfileSpec newProfileSpec) async {
|
||||
log.debug('Creating super identity');
|
||||
final wsi = await WritableSuperIdentity.create();
|
||||
try {
|
||||
|
@ -181,6 +182,8 @@ class AccountRepository {
|
|||
final ok = await login(
|
||||
localAccount.superIdentity.recordKey, EncryptionKeyType.none, '');
|
||||
assert(ok, 'login with none should never fail');
|
||||
|
||||
return wsi.superSecret;
|
||||
} on Exception catch (_) {
|
||||
await wsi.delete();
|
||||
rethrow;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue