Don't send empty SecretRequest cancellation if there are only 2 devices
This commit is contained in:
parent
2769642d3c
commit
1bd2970c4d
1 changed files with 13 additions and 11 deletions
|
|
@ -398,6 +398,7 @@ handle_olm_message(const OlmMessage &msg, const UserKeyCache &otherUserDeviceKey
|
||||||
body[local_user][dev] = secretRequest;
|
body[local_user][dev] = secretRequest;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!body.empty()) {
|
||||||
http::client()->send_to_device<mtx::events::msg::SecretRequest>(
|
http::client()->send_to_device<mtx::events::msg::SecretRequest>(
|
||||||
http::client()->generate_txn_id(),
|
http::client()->generate_txn_id(),
|
||||||
body,
|
body,
|
||||||
|
|
@ -409,6 +410,7 @@ handle_olm_message(const OlmMessage &msg, const UserKeyCache &otherUserDeviceKey
|
||||||
secret_name);
|
secret_name);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
nhlog::crypto()->info("Storing secret {}", secret_name);
|
nhlog::crypto()->info("Storing secret {}", secret_name);
|
||||||
cache::client()->storeSecret(secret_name, e->content.secret);
|
cache::client()->storeSecret(secret_name, e->content.secret);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue