diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2020-07-22 19:15:28 +0300 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2020-07-22 19:15:28 +0300 |
commit | 48a4e9f5ed3851bd56bd54c5c761fe9133b92350 (patch) | |
tree | a8826d2dc98d5e234beb71c5b56d7678a341506a /indra/newview/llnotificationofferhandler.cpp | |
parent | 7d4b1c014c9900af47005a529df50ece14249326 (diff) |
SL-13620 FIXED The code appears instead of the maturity icon in the chat history
Diffstat (limited to 'indra/newview/llnotificationofferhandler.cpp')
-rw-r--r-- | indra/newview/llnotificationofferhandler.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp index 14d25d8158..a9678b1e93 100644 --- a/indra/newview/llnotificationofferhandler.cpp +++ b/indra/newview/llnotificationofferhandler.cpp @@ -37,6 +37,8 @@ #include "llimview.h" #include "llnotificationsutil.h" +#include <boost/regex.hpp> + using namespace LLNotificationsUI; //-------------------------------------------------------------------------- @@ -143,7 +145,19 @@ bool LLOfferHandler::processNotification(const LLNotificationPtr& notification) { // log only to file if notif panel can be embedded to IM and IM is opened bool file_only = add_notif_to_im && LLHandlerUtil::isIMFloaterOpened(notification); - LLHandlerUtil::logToIMP2P(notification, file_only); + if ((notification->getName() == "TeleportOffered" + || notification->getName() == "TeleportOffered_MaturityExceeded" + || notification->getName() == "TeleportOffered_MaturityBlocked")) + { + boost::regex r("<icon\\s*>\\s*([^<]*)?\\s*</icon\\s*>( - )?", + boost::regex::perl|boost::regex::icase); + std::string stripped_msg = boost::regex_replace(notification->getMessage(), r, ""); + LLHandlerUtil::logToIMP2P(notification->getPayload()["from_id"], stripped_msg,file_only); + } + else + { + LLHandlerUtil::logToIMP2P(notification, file_only); + } } } |