diff options
-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 |