diff --git a/indra/newview/llnotificationhandler.h b/indra/newview/llnotificationhandler.h index 7a183cb298e9449ba39e0014fafcbe1cb3ecb2b0..52c5234137f36f2eb2a4862178b5e61c6a027209 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 4a3923ef6eb1289a6e30571bec2a184a1646c573..6a5819676079934bd4afc6b76e410fb3cc83a9dd 100644 --- a/indra/newview/llnotificationhandlerutil.cpp +++ b/indra/newview/llnotificationhandlerutil.cpp @@ -241,6 +241,20 @@ std::string LLHandlerUtil::getSubstitutionName(const LLNotificationPtr& notifica return res; } +// 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) { diff --git a/indra/newview/llnotificationtiphandler.cpp b/indra/newview/llnotificationtiphandler.cpp index 596327e8f1a40e033c2ce2b11159703a006abe89..a6ef130cd006b61ad457a3921c284f538e5c79db 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 2dc219a7691c0122bb887e60c88533f0e7f4243d..06f868dc087913f51b65e329bfa295d33f7e3cfc 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