This commit is contained in:
Sorunome 2020-05-27 10:33:42 +02:00
parent f78657957a
commit 8d75c2a0af
No known key found for this signature in database
GPG key ID: B19471D07FC9BE9C
3 changed files with 9 additions and 4 deletions

View file

@ -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']);
}

View file

@ -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');

View file

@ -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;
}