fix: Secret storage keys are used as account data but are not uri encoded

This always encodes the storage
key so it can be used as account data.
Before the app has waited failed
to use this key at all so we do not
need a migration.
This commit is contained in:
Christian Pauly 2022-08-12 09:06:51 +02:00
parent f7003933e6
commit 2f944292ba
1 changed files with 3 additions and 1 deletions

View File

@ -81,7 +81,9 @@ abstract class EventTypes {
static const String MegolmBackup = 'm.megolm_backup.v1';
static const String SecretStorageDefaultKey = 'm.secret_storage.default_key';
static String secretStorageKey(String keyId) => 'm.secret_storage.key.$keyId';
// Also used as account data type so it needs to be uri encoded
static String secretStorageKey(String keyId) =>
Uri.encodeComponent('m.secret_storage.key.$keyId');
// Spaces
static const String spaceParent = 'm.space.parent';