diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2017-05-24 11:06:21 +0300 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2017-05-24 11:06:21 +0300 |
commit | b4e54352171f6b95714270909cda99dc1c5ad3f0 (patch) | |
tree | 6b5b3659e42f19b9851392d83335f4e7998072a5 /indra/newview | |
parent | a01b7fc281957c8896d760236e63bd04686e0832 (diff) |
MAINT-7434 FIXED SLURL instead of username appears in "have said something new" text for some messages
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llnotificationhandler.h | 2 | ||||
-rw-r--r-- | indra/newview/llnotificationhandlerutil.cpp | 14 | ||||
-rw-r--r-- | indra/newview/llnotificationtiphandler.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llviewermessage.cpp | 1 |
4 files changed, 18 insertions, 1 deletions
diff --git a/indra/newview/llnotificationhandler.h b/indra/newview/llnotificationhandler.h index 7a183cb298..52c5234137 100644 --- a/indra/newview/llnotificationhandler.h +++ b/indra/newview/llnotificationhandler.h @@ -322,6 +322,8 @@ public: */ static std::string getSubstitutionName(const LLNotificationPtr& notification); + static std::string getSubstitutionOriginalName(const LLNotificationPtr& notification); + /** * Adds notification panel to the IM floater. */ diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp index 4a3923ef6e..6a58196760 100644 --- a/indra/newview/llnotificationhandlerutil.cpp +++ b/indra/newview/llnotificationhandlerutil.cpp @@ -242,6 +242,20 @@ std::string LLHandlerUtil::getSubstitutionName(const LLNotificationPtr& notifica } // static +std::string LLHandlerUtil::getSubstitutionOriginalName(const LLNotificationPtr& notification) +{ + if(notification->getSubstitutions().has("ORIGINAL_NAME")) + { + std::string name = notification->getSubstitutions()["ORIGINAL_NAME"]; + if(!name.empty()) + { + return name; + } + } + return LLHandlerUtil::getSubstitutionName(notification); +} + +// static void LLHandlerUtil::addNotifPanelToIM(const LLNotificationPtr& notification) { const std::string name = LLHandlerUtil::getSubstitutionName(notification); diff --git a/indra/newview/llnotificationtiphandler.cpp b/indra/newview/llnotificationtiphandler.cpp index 596327e8f1..a6ef130cd0 100644 --- a/indra/newview/llnotificationtiphandler.cpp +++ b/indra/newview/llnotificationtiphandler.cpp @@ -86,7 +86,7 @@ bool LLTipHandler::processNotification(const LLNotificationPtr& notification) } std::string session_name = notification->getPayload()["SESSION_NAME"]; - const std::string name = notification->getSubstitutions()["NAME"]; + const std::string name = LLHandlerUtil::getSubstitutionOriginalName(notification); if (session_name.empty()) { session_name = name; diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 2dc219a769..06f868dc08 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2841,6 +2841,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) case IM_INVENTORY_ACCEPTED: { args["NAME"] = LLSLURL("agent", from_id, "completename").getSLURLString();; + args["ORIGINAL_NAME"] = original_name; LLSD payload; payload["from_id"] = from_id; // Passing the "SESSION_NAME" to use it for IM notification logging |