Merge pull request #1862 from famedly/krille/fix-type-error-in-app

fix: Type error when uploading room keys
This commit is contained in:
Krille-chan 2024-06-25 10:16:25 +02:00 committed by GitHub
commit 5fb614703b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 4 deletions

View File

@ -89,10 +89,10 @@ class SessionKey {
// we need to try...catch as the map used to be <String, int> and that will throw an error. // we need to try...catch as the map used to be <String, int> and that will throw an error.
senderClaimedKeys = (parsedSenderClaimedKeys.isNotEmpty) senderClaimedKeys = (parsedSenderClaimedKeys.isNotEmpty)
? parsedSenderClaimedKeys ? parsedSenderClaimedKeys
: (content['sender_claimed_keys'] is Map : (content
? content['sender_claimed_keys'] .tryGetMap<String, dynamic>('sender_claimed_keys')
.catchMap((k, v) => MapEntry<String, String>(k, v)) ?.catchMap((k, v) => MapEntry<String, String>(k, v)) ??
: (content['sender_claimed_ed25519_key'] is String (content['sender_claimed_ed25519_key'] is String
? <String, String>{ ? <String, String>{
'ed25519': content['sender_claimed_ed25519_key'] 'ed25519': content['sender_claimed_ed25519_key']
} }