made the invite system non automatic, because it was confusing and could generate unwanted emails

This commit is contained in:
csoler 2018-02-23 14:26:23 +01:00
parent fa84d1c881
commit 5a4d0f57d1
No known key found for this signature in database
GPG Key ID: 7BCA522266C0804C
5 changed files with 16 additions and 15 deletions

View File

@ -2608,9 +2608,10 @@ void IdDialog::sendInvite()
RsGxsId id(ui->lineEdit_KeyId->text().toStdString()); RsGxsId id(ui->lineEdit_KeyId->text().toStdString());
if ((QMessageBox::question(this, tr("Send invite?"),tr("Do you really want send a invite with your Certificate?"),QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes))== QMessageBox::Yes) //if ((QMessageBox::question(this, tr("Send invite?"),tr("Do you really want send a invite with your Certificate?"),QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes))== QMessageBox::Yes)
{ {
MessageComposer::sendInvite(id); MessageComposer::sendInvite(id,false);
ui->inviteFrame->show(); ui->inviteFrame->show();
ui->inviteButton->setEnabled(false); ui->inviteButton->setEnabled(false);
} }

View File

@ -370,9 +370,9 @@ void MsgItem::sendInvite()
if (!rsMail->getMessage(mMsgId, mi)) if (!rsMail->getMessage(mMsgId, mi))
return; return;
if ((QMessageBox::question(this, tr("Send invite?"),tr("Do you really want send a invite with your Certificate?"),QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes))== QMessageBox::Yes) //if ((QMessageBox::question(this, tr("Send invite?"),tr("Do you really want send a invite with your Certificate?"),QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes))== QMessageBox::Yes)
{ //{
MessageComposer::sendInvite(mi.rsgxsid_srcId); MessageComposer::sendInvite(mi.rsgxsid_srcId,false);
} //}
} }

View File

@ -2775,12 +2775,12 @@ QString MessageComposer::inviteMessage()
return tr("Hi,<br>I want to be friends with you on RetroShare.<br>"); return tr("Hi,<br>I want to be friends with you on RetroShare.<br>");
} }
void MessageComposer::sendInvite(const RsGxsId &to, const QString &/*msg*/, bool autoSend) void MessageComposer::sendInvite(const RsGxsId &to, bool autoSend)
{ {
/* create a message */ /* create a message */
MessageComposer *composer = MessageComposer::newMsg(); MessageComposer *composer = MessageComposer::newMsg();
composer->setTitleText(tr("You have a friend invite")); composer->setTitleText(tr("Invite message"));
composer->msgFlags |= RS_MSG_USER_REQUEST; composer->msgFlags |= RS_MSG_USER_REQUEST;
@ -2803,8 +2803,8 @@ void MessageComposer::sendInvite(const RsGxsId &to, const QString &/*msg*/, bool
return; return;
} }
} }
else
//composer->show(); composer->show();
/* window will destroy itself! */ /* window will destroy itself! */
} }

View File

@ -64,7 +64,7 @@ public:
static QString recommendMessage(); static QString recommendMessage();
static void recommendFriend(const std::set <RsPeerId> &sslIds, const RsPeerId &to = RsPeerId(), const QString &msg = "", bool autoSend = false); static void recommendFriend(const std::set <RsPeerId> &sslIds, const RsPeerId &to = RsPeerId(), const QString &msg = "", bool autoSend = false);
static void sendConnectAttemptMsg(const RsPgpId &gpgId, const RsPeerId &sslId, const QString &sslName); static void sendConnectAttemptMsg(const RsPgpId &gpgId, const RsPeerId &sslId, const QString &sslName);
static void sendInvite(const RsGxsId &to = RsGxsId(), const QString &msg = "", bool autoSend = true); static void sendInvite(const RsGxsId &to, bool autoSend);
#ifdef UNUSED_CODE #ifdef UNUSED_CODE
static void sendChannelPublishKey(RsGxsChannelGroup &group); static void sendChannelPublishKey(RsGxsChannelGroup &group);
static void sendForumPublishKey(RsGxsForumGroup &group); static void sendForumPublishKey(RsGxsForumGroup &group);

View File

@ -789,9 +789,9 @@ void MessageWidget::sendInvite()
if (!rsMail->getMessage(currMsgId, mi)) if (!rsMail->getMessage(currMsgId, mi))
return; return;
if ((QMessageBox::question(this, tr("Send invite?"),tr("Do you really want send a invite with your Certificate?"),QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes))== QMessageBox::Yes) //if ((QMessageBox::question(this, tr("Send invite?"),tr("Do you really want send a invite with your Certificate?"),QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes))== QMessageBox::Yes)
{ //{
MessageComposer::sendInvite(mi.rsgxsid_srcId); MessageComposer::sendInvite(mi.rsgxsid_srcId,false);
} //}
} }