Show verification status next to messages
This commit is contained in:
parent
7333de19da
commit
0d0709ccd3
14 changed files with 108 additions and 22 deletions
12
src/Olm.cpp
12
src/Olm.cpp
|
|
@ -939,7 +939,6 @@ decryptEvent(const MegolmSessionIndex &index,
|
|||
}
|
||||
|
||||
// TODO: Lookup index,event_id,origin_server_ts tuple for replay attack errors
|
||||
// TODO: Verify sender_key
|
||||
|
||||
std::string msg_str;
|
||||
try {
|
||||
|
|
@ -976,6 +975,17 @@ decryptEvent(const MegolmSessionIndex &index,
|
|||
return {std::nullopt, std::nullopt, std::move(te.data)};
|
||||
}
|
||||
|
||||
crypto::Trust
|
||||
calculate_trust(const std::string &user_id, const std::string &curve25519)
|
||||
{
|
||||
auto status = cache::client()->verificationStatus(user_id);
|
||||
crypto::Trust trustlevel = crypto::Trust::Unverified;
|
||||
if (status.verified_device_keys.count(curve25519))
|
||||
trustlevel = status.verified_device_keys.at(curve25519);
|
||||
|
||||
return trustlevel;
|
||||
}
|
||||
|
||||
//! Send encrypted to device messages, targets is a map from userid to device ids or {} for all
|
||||
//! devices
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue