MAINT-7156: do not use the server-supplied agent email when sending a postcard because it is obfuscated and not needed
parent
3f400927b2
commit
32bf3190fb
|
|
@ -58,7 +58,6 @@ public:
|
|||
/*virtual*/ ~LLPanelSnapshotPostcard(); // <FS:Ansariel> Store settings at logout
|
||||
/*virtual*/ BOOL postBuild();
|
||||
/*virtual*/ void onOpen(const LLSD& key);
|
||||
/*virtual*/ S32 notify(const LLSD& info);
|
||||
|
||||
private:
|
||||
/*virtual*/ std::string getWidthSpinnerName() const { return "postcard_snapshot_width"; }
|
||||
|
|
@ -80,7 +79,6 @@ private:
|
|||
void onSend();
|
||||
|
||||
bool mHasFirstMsgFocus;
|
||||
std::string mAgentEmail;
|
||||
};
|
||||
|
||||
static LLPanelInjector<LLPanelSnapshotPostcard> panel_class("llpanelsnapshotpostcard");
|
||||
|
|
@ -115,36 +113,9 @@ BOOL LLPanelSnapshotPostcard::postBuild()
|
|||
// virtual
|
||||
void LLPanelSnapshotPostcard::onOpen(const LLSD& key)
|
||||
{
|
||||
// pick up the user's up-to-date email address
|
||||
if (mAgentEmail.empty())
|
||||
{
|
||||
gAgent.sendAgentUserInfoRequest();
|
||||
|
||||
std::string name_string;
|
||||
LLAgentUI::buildFullname(name_string);
|
||||
getChild<LLUICtrl>("name_form")->setValue(LLSD(name_string));
|
||||
}
|
||||
|
||||
LLPanelSnapshot::onOpen(key);
|
||||
}
|
||||
|
||||
// virtual
|
||||
S32 LLPanelSnapshotPostcard::notify(const LLSD& info)
|
||||
{
|
||||
if (!info.has("agent-email"))
|
||||
{
|
||||
llassert(info.has("agent-email"));
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (mAgentEmail.empty())
|
||||
{
|
||||
mAgentEmail = info["agent-email"].asString();
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
// virtual
|
||||
void LLPanelSnapshotPostcard::updateControls(const LLSD& info)
|
||||
{
|
||||
|
|
@ -197,7 +168,6 @@ void LLPanelSnapshotPostcard::sendPostcard()
|
|||
if (!url.empty())
|
||||
{
|
||||
LLResourceUploadInfo::ptr_t uploadInfo(new LLPostcardUploadInfo(
|
||||
mAgentEmail,
|
||||
getChild<LLUICtrl>("name_form")->getValue().asString(),
|
||||
getChild<LLUICtrl>("to_form")->getValue().asString(),
|
||||
getChild<LLUICtrl>("subject_form")->getValue().asString(),
|
||||
|
|
@ -260,12 +230,6 @@ void LLPanelSnapshotPostcard::onSend()
|
|||
return;
|
||||
}
|
||||
|
||||
if (mAgentEmail.empty() || !boost::regex_match(mAgentEmail, email_format))
|
||||
{
|
||||
LLNotificationsUtil::add("PromptSelfEmail");
|
||||
return;
|
||||
}
|
||||
|
||||
std::string subject(getChild<LLUICtrl>("subject_form")->getValue().asString());
|
||||
if(subject.empty() || !mHasFirstMsgFocus)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -40,11 +40,10 @@
|
|||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
LLPostcardUploadInfo::LLPostcardUploadInfo(std::string emailFrom, std::string nameFrom, std::string emailTo,
|
||||
LLPostcardUploadInfo::LLPostcardUploadInfo(std::string nameFrom, std::string emailTo,
|
||||
std::string subject, std::string message, LLVector3d globalPosition,
|
||||
LLPointer<LLImageFormatted> image, invnUploadFinish_f finish) :
|
||||
LLBufferedAssetUploadInfo(LLUUID::null, image, finish),
|
||||
mEmailFrom(emailFrom),
|
||||
mNameFrom(nameFrom),
|
||||
mEmailTo(emailTo),
|
||||
mSubject(subject),
|
||||
|
|
@ -58,7 +57,6 @@ LLSD LLPostcardUploadInfo::generatePostBody()
|
|||
LLSD postcard = LLSD::emptyMap();
|
||||
postcard["pos-global"] = mGlobalPosition.getValue();
|
||||
postcard["to"] = mEmailTo;
|
||||
postcard["from"] = mEmailFrom;
|
||||
postcard["name"] = mNameFrom;
|
||||
postcard["subject"] = mSubject;
|
||||
postcard["msg"] = mMessage;
|
||||
|
|
|
|||
|
|
@ -53,13 +53,12 @@ private:
|
|||
class LLPostcardUploadInfo : public LLBufferedAssetUploadInfo
|
||||
{
|
||||
public:
|
||||
LLPostcardUploadInfo(std::string emailFrom, std::string nameFrom, std::string emailTo,
|
||||
LLPostcardUploadInfo(std::string nameFrom, std::string emailTo,
|
||||
std::string subject, std::string message, LLVector3d globalPosition,
|
||||
LLPointer<LLImageFormatted> image, invnUploadFinish_f finish);
|
||||
|
||||
virtual LLSD generatePostBody();
|
||||
private:
|
||||
std::string mEmailFrom;
|
||||
std::string mNameFrom;
|
||||
std::string mEmailTo;
|
||||
std::string mSubject;
|
||||
|
|
|
|||
Loading…
Reference in New Issue