fixed response to distant peer when not actually a friend. Added warning when key is not available

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6837 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2013-10-16 20:20:41 +00:00
parent cd43900eb9
commit 26c1ce8025

View File

@ -1630,11 +1630,21 @@ void MessageComposer::addRecipient(enumType type, const std::string &id, bool gr
return;
}
if (detail.isOnlyGPGdetail) {
if (!rsPeers->getAssociatedSSLIds(id, sslIds)) {
return;
}
} else {
if (detail.isOnlyGPGdetail)
{
if(!rsPeers->getAssociatedSSLIds(id, sslIds))
{
std::string hash ;
if(rsMsgs->getDistantMessageHash(id,hash))
addRecipient(type, hash, id);
else
{
QMessageBox::warning(this,tr("PGP key unknown"),tr("You dont have the PGP key of the message sender. So you cannot respond!"),QMessageBox::Ok) ;
return;
}
}
}
else {
sslIds.push_back(id);
}
}