added flags to invite system to unify the different variables and made sure the HomePage contains at least current IP (not fully tested)

This commit is contained in:
csoler 2020-11-09 22:42:28 +01:00
parent d2bd947252
commit 9a2749dbe5
16 changed files with 339 additions and 313 deletions
retroshare-gui/src/gui/connect

View file

@ -275,15 +275,22 @@ void ConfCertDialog::loadInvitePage()
// ui.userCertificateText_2->setText(QString::fromUtf8(pgp_key.c_str()));
std::string invite ;
RetroshareInviteFlags flags = RetroshareInviteFlags::DNS | RetroshareInviteFlags::CURRENT_IP | RetroshareInviteFlags::RADIX_FORMAT;
if(!detail.isHiddenNode && ui._includeIPHistory_CB->isChecked())
flags |= RetroshareInviteFlags::FULL_IP_HISTORY;
if(ui._shortFormat_CB->isChecked())
{
rsPeers->getShortInvite(invite,detail.id,true,!(ui._includeIPHistory_CB->isChecked()|| detail.isHiddenNode) );
rsPeers->getShortInvite(invite,detail.id,flags);
ui.stabWidget->setTabText(1, tr("Retroshare ID"));
}
else
{
invite = rsPeers->GetRetroshareInvite(detail.id, ui._shouldAddSignatures_CB->isChecked(), ui._includeIPHistory_CB->isChecked() ) ;
if(ui._shouldAddSignatures_CB->isChecked())
flags |= RetroshareInviteFlags::PGP_SIGNATURES;
invite = rsPeers->GetRetroshareInvite(detail.id, flags ) ;
ui.stabWidget->setTabText(1, tr("Retroshare Certificate"));
}