From 8d75c2a0afed1758015bf39c67614c7729b81b35 Mon Sep 17 00:00:00 2001 From: Sorunome Date: Wed, 27 May 2020 10:33:42 +0200 Subject: [PATCH] format --- lib/src/room.dart | 4 +++- lib/src/utils/device_keys_list.dart | 3 ++- lib/src/utils/key_verification.dart | 6 ++++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/src/room.dart b/lib/src/room.dart index 044208e..6975fff 100644 --- a/lib/src/room.dart +++ b/lib/src/room.dart @@ -592,7 +592,9 @@ class Room { final event = room.getState('im.ponies.room_emotes', stateKey); if (event != null && stateKeyEntry.value is Map) { addEmotePack( - (room.canonicalAlias?.isEmpty ?? true) ? room.id : canonicalAlias, + (room.canonicalAlias?.isEmpty ?? true) + ? room.id + : canonicalAlias, event.content, stateKeyEntry.value['name']); } diff --git a/lib/src/utils/device_keys_list.dart b/lib/src/utils/device_keys_list.dart index ce62d4b..f140298 100644 --- a/lib/src/utils/device_keys_list.dart +++ b/lib/src/utils/device_keys_list.dart @@ -27,7 +27,8 @@ class DeviceKeysList { return null; } - CrossSigningKey getCrossSigningKey(String type) => crossSigningKeys.values.firstWhere((k) => k.usage.contains(type)); + CrossSigningKey getCrossSigningKey(String type) => + crossSigningKeys.values.firstWhere((k) => k.usage.contains(type)); CrossSigningKey get masterKey => getCrossSigningKey('master'); CrossSigningKey get selfSigningKey => getCrossSigningKey('self_signing'); diff --git a/lib/src/utils/key_verification.dart b/lib/src/utils/key_verification.dart index fed1a63..96b56cc 100644 --- a/lib/src/utils/key_verification.dart +++ b/lib/src/utils/key_verification.dart @@ -151,7 +151,8 @@ class KeyVerification { randomString(512) + DateTime.now().millisecondsSinceEpoch.toString(); } if (client.crossSigning.enabled && - !(await client.crossSigning.isCached()) && !client.isUnknownSession) { + !(await client.crossSigning.isCached()) && + !client.isUnknownSession) { setState(KeyVerificationState.askSSSS); _nextAction = 'request'; } else { @@ -358,7 +359,8 @@ class KeyVerification { var verifiedMasterKey = false; final wasUnknownSession = client.isUnknownSession; for (final key in _verifiedDevices) { - await key.setVerified(true, false); // we don't want to sign the keys juuuust yet + await key.setVerified( + true, false); // we don't want to sign the keys juuuust yet if (key is CrossSigningKey && key.usage.contains('master')) { verifiedMasterKey = true; }