Changed the recommendation of friends from person link to certificate link.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4838 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2012-01-23 22:38:50 +00:00
parent ecf49d0e14
commit cb9111ad88
3 changed files with 40 additions and 27 deletions

View file

@ -376,7 +376,7 @@ void FriendList::peerTreeWidgetCostumPopupMenu()
// contextMnu.addAction(QIcon(IMAGE_PEERINFO), tr("Profile View"), this, SLOT(viewprofile()));
// action = contextMnu.addAction(QIcon(IMAGE_EXPORTFRIEND), tr("Export Friend"), this, SLOT(exportfriend()));
if (type == TYPE_GPG) {
if (type == TYPE_GPG || type == TYPE_SSL) {
contextMnu.addAction(QIcon(IMAGE_EXPORTFRIEND), tr("Recommend this Friend to..."), this, SLOT(recommendfriend()));
}
@ -1247,8 +1247,20 @@ void FriendList::recommendfriend()
if (!peer)
return;
std::string peerId = getRsId(peer);
std::list<std::string> ids;
ids.push_back(getRsId(peer));
switch (peer->type()) {
case TYPE_SSL:
ids.push_back(peerId);
break;
case TYPE_GPG:
rsPeers->getAssociatedSSLIds(peerId, ids);
break;
default:
return;
}
MessageComposer::recommendFriend(ids);
}