mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-23 22:51:12 -04:00
fixed a few bugs in latest identity link code
This commit is contained in:
parent
6d290389f0
commit
54cd402f1c
2 changed files with 18 additions and 1 deletions
|
@ -2432,6 +2432,7 @@ void IdDialog::copyRetroshareLink()
|
||||||
|
|
||||||
RetroShareLink link ;
|
RetroShareLink link ;
|
||||||
link.createIdentity(RsGxsId(keyId),QString::fromUtf8(details.mNickname.c_str()),QString::fromStdString(radix)) ;
|
link.createIdentity(RsGxsId(keyId),QString::fromUtf8(details.mNickname.c_str()),QString::fromStdString(radix)) ;
|
||||||
|
urls.push_back(link);
|
||||||
|
|
||||||
RSLinkClipboard::copyLinks(urls) ;
|
RSLinkClipboard::copyLinks(urls) ;
|
||||||
|
|
||||||
|
|
|
@ -307,6 +307,21 @@ void RetroShareLink::fromUrl(const QUrl& url)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(url.host() == HOST_IDENTITY) {
|
||||||
|
_type = TYPE_IDENTITY ;
|
||||||
|
QString name = urlQuery.queryItemValue(IDENTITY_NAME) ;
|
||||||
|
QString radix= urlQuery.queryItemValue(IDENTITY_GROUP) ;
|
||||||
|
QString gxsid= urlQuery.queryItemValue(IDENTITY_ID) ;
|
||||||
|
|
||||||
|
RsGxsId id(gxsid.toStdString()) ;
|
||||||
|
|
||||||
|
if(!id.isNull())
|
||||||
|
createIdentity(id,name,radix) ;
|
||||||
|
else
|
||||||
|
std::cerr << "(EE) identity link is not valid." << std::endl;
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
if (url.host() == HOST_MESSAGE) {
|
if (url.host() == HOST_MESSAGE) {
|
||||||
_type = TYPE_MESSAGE;
|
_type = TYPE_MESSAGE;
|
||||||
std::string id = urlQuery.queryItemValue(MESSAGE_ID).toStdString();
|
std::string id = urlQuery.queryItemValue(MESSAGE_ID).toStdString();
|
||||||
|
@ -844,7 +859,7 @@ QString RetroShareLink::niceName() const
|
||||||
return PeerDefs::rsid(name().toUtf8().constData(), RsPgpId(hash().toStdString()));
|
return PeerDefs::rsid(name().toUtf8().constData(), RsPgpId(hash().toStdString()));
|
||||||
|
|
||||||
if(type() == TYPE_IDENTITY)
|
if(type() == TYPE_IDENTITY)
|
||||||
return QObject::tr("Click this link to add this person (name=%1, ID=%2) to your People tab.").arg(_name).arg(_hash) ;
|
return QObject::tr("Identity link (name=%1, ID=%2)").arg(_name).arg(_hash) ;
|
||||||
|
|
||||||
if(type() == TYPE_PUBLIC_MSG) {
|
if(type() == TYPE_PUBLIC_MSG) {
|
||||||
RsPeerDetails detail;
|
RsPeerDetails detail;
|
||||||
|
@ -1055,6 +1070,7 @@ static void processList(const QStringList &list, const QString &textSingular, co
|
||||||
case TYPE_POSTED:
|
case TYPE_POSTED:
|
||||||
case TYPE_SEARCH:
|
case TYPE_SEARCH:
|
||||||
case TYPE_MESSAGE:
|
case TYPE_MESSAGE:
|
||||||
|
case TYPE_IDENTITY:
|
||||||
case TYPE_CERTIFICATE:
|
case TYPE_CERTIFICATE:
|
||||||
case TYPE_PUBLIC_MSG:
|
case TYPE_PUBLIC_MSG:
|
||||||
case TYPE_PRIVATE_CHAT:
|
case TYPE_PRIVATE_CHAT:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue