summaryrefslogtreecommitdiff
path: root/indra/newview/llnotificationofferhandler.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2021-04-30 03:04:47 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2021-04-30 03:04:47 +0300
commit0fa5fc47a2069a2c151536baa917b9c6978480e4 (patch)
tree2964096f28a6a5e7f08e5a0aa83f2ffe76d42421 /indra/newview/llnotificationofferhandler.cpp
parent498b72aacd6d10dfcd4f15e1d16532dc138f0461 (diff)
parentce65bc2f13409d75dbc6502c970030cc5ed2e5ad (diff)
Merge branch 'master' into DRTVWR-527-maint
Diffstat (limited to 'indra/newview/llnotificationofferhandler.cpp')
-rw-r--r--indra/newview/llnotificationofferhandler.cpp16
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);
+ }
}
}