diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2021-10-01 14:09:12 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2021-11-30 01:19:43 +0200 |
commit | ef0b48ce5a918d30e4303c7b6eebec69c21ab8cf (patch) | |
tree | 87780a033d402dcf8a27b3cc82d553c7aa9fcec6 /indra/newview/llagent.cpp | |
parent | 850767eb214371737970aad00c9b3e8103f98b32 (diff) |
SL-16119 Viewer should now direct IM 2 Email setting to web
Diffstat (limited to 'indra/newview/llagent.cpp')
-rw-r--r-- | indra/newview/llagent.cpp | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 1e7711e577..50e0d1d935 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -4636,23 +4636,19 @@ void LLAgent::requestAgentUserInfoCoro(std::string capurl) return; } - bool im_via_email; - bool is_verified_email; std::string email; std::string dir_visibility; - im_via_email = result["im_via_email"].asBoolean(); - is_verified_email = result["is_verified"].asBoolean(); email = result["email"].asString(); dir_visibility = result["directory_visibility"].asString(); // TODO: This should probably be changed. I'm not entirely comfortable // having LLAgent interact directly with the UI in this way. - LLFloaterPreference::updateUserInfo(dir_visibility, im_via_email, is_verified_email); + LLFloaterPreference::updateUserInfo(dir_visibility); LLFloaterSnapshot::setAgentEmail(email); } -void LLAgent::sendAgentUpdateUserInfo(bool im_via_email, const std::string& directory_visibility) +void LLAgent::sendAgentUpdateUserInfo(const std::string& directory_visibility) { std::string cap; @@ -4665,16 +4661,16 @@ void LLAgent::sendAgentUpdateUserInfo(bool im_via_email, const std::string& dire if (!cap.empty()) { LLCoros::instance().launch("updateAgentUserInfoCoro", - boost::bind(&LLAgent::updateAgentUserInfoCoro, this, cap, im_via_email, directory_visibility)); + boost::bind(&LLAgent::updateAgentUserInfoCoro, this, cap, directory_visibility)); } else { - sendAgentUpdateUserInfoMessage(im_via_email, directory_visibility); + sendAgentUpdateUserInfoMessage(directory_visibility); } } -void LLAgent::updateAgentUserInfoCoro(std::string capurl, bool im_via_email, std::string directory_visibility) +void LLAgent::updateAgentUserInfoCoro(std::string capurl, std::string directory_visibility) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -4685,8 +4681,8 @@ void LLAgent::updateAgentUserInfoCoro(std::string capurl, bool im_via_email, std httpOpts->setFollowRedirects(true); LLSD body(LLSDMap - ("dir_visibility", LLSD::String(directory_visibility)) - ("im_via_email", LLSD::Boolean(im_via_email))); + ("dir_visibility", LLSD::String(directory_visibility))); + LLSD result = httpAdapter->postAndSuspend(httpRequest, capurl, body, httpOpts, httpHeaders); @@ -4714,14 +4710,13 @@ void LLAgent::sendAgentUserInfoRequestMessage() sendReliableMessage(); } -void LLAgent::sendAgentUpdateUserInfoMessage(bool im_via_email, const std::string& directory_visibility) +void LLAgent::sendAgentUpdateUserInfoMessage(const std::string& directory_visibility) { gMessageSystem->newMessageFast(_PREHASH_UpdateUserInfo); gMessageSystem->nextBlockFast(_PREHASH_AgentData); gMessageSystem->addUUIDFast(_PREHASH_AgentID, getID()); gMessageSystem->addUUIDFast(_PREHASH_SessionID, getSessionID()); gMessageSystem->nextBlockFast(_PREHASH_UserData); - gMessageSystem->addBOOLFast(_PREHASH_IMViaEMail, im_via_email); gMessageSystem->addString("DirectoryVisibility", directory_visibility); gAgent.sendReliableMessage(); |