forked from blue/squawk
some further work on omemo, far from done yet
This commit is contained in:
parent
6f32e99593
commit
77dd28b600
18 changed files with 161 additions and 43 deletions
|
@ -326,6 +326,20 @@ QXmppTask<void> TrustHandler::setSecurityPolicy(
|
|||
return Core::makeReadyTask();
|
||||
}
|
||||
|
||||
Core::TrustHandler::Keys Core::TrustHandler::getKeys(const QString& protocol, const QString& jid) const {
|
||||
std::map<QString, KeyCache*>::const_iterator itr = keysByProtocol.find(protocol);
|
||||
if (itr != keysByProtocol.end()) {
|
||||
try {
|
||||
Keys map = itr->second->getRecord(jid);
|
||||
return map;
|
||||
} catch (const DataBase::NotFound& e) {
|
||||
return Keys();
|
||||
}
|
||||
} else {
|
||||
return Keys();
|
||||
}
|
||||
}
|
||||
|
||||
Shared::TrustLevel Core::TrustHandler::convert(Core::TrustHandler::TL level)
|
||||
{
|
||||
switch (level) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue