From 26c1ce8025a391af1a69468997ff761569478a11 Mon Sep 17 00:00:00 2001 From: csoler Date: Wed, 16 Oct 2013 20:20:41 +0000 Subject: [PATCH] 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 --- .../src/gui/msgs/MessageComposer.cpp | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/retroshare-gui/src/gui/msgs/MessageComposer.cpp b/retroshare-gui/src/gui/msgs/MessageComposer.cpp index 9a6908aad..c340106b7 100644 --- a/retroshare-gui/src/gui/msgs/MessageComposer.cpp +++ b/retroshare-gui/src/gui/msgs/MessageComposer.cpp @@ -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); } }