use unstable prefix

This commit is contained in:
Hubert Chathi
2020-09-24 17:41:08 -04:00
parent 492c1d77d8
commit b0204ab54e
2 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -1959,7 +1959,7 @@ async function _uploadOneTimeKeys(crypto) {
const res = await crypto._baseApis.uploadKeysRequest({
one_time_keys: oneTimeJson,
fallback_keys: fallbackJson,
"org.matrix.msc2732.fallback_keys": fallbackJson,
});
await crypto._olmDevice.markKeysAsPublished();
+4 -3
View File
@@ -1361,13 +1361,14 @@ SyncApi.prototype._processSyncResponse = async function(
const currentCount = data.device_one_time_keys_count.signed_curve25519 || 0;
this.opts.crypto.updateOneTimeKeyCount(currentCount);
}
if (this.opts.crypto && data.device_unused_fallback_keys) {
if (this.opts.crypto && data["org.matrix.msc2732.device_unused_fallback_keys"]) {
// The presence of device_unused_fallback_keys indicates that the
// server supports fallback keys. If there's no unused
// signed_curve25519 fallback key we need a new one.
const unused_fallback_keys = data["org.matrix.msc2732.device_unused_fallback_keys"];
this.opts.crypto.setNeedsNewFallback(
data.device_unused_fallback_keys instanceof Array &&
!data.device_unused_fallback_keys.includes("signed_curve25519"),
unused_fallback_keys instanceof Array &&
!unused_fallback_keys.includes("signed_curve25519"),
);
}
};