From 54a3f1051e5ef411b39ac34ba37fc7444832a3eb Mon Sep 17 00:00:00 2001
From: Alexei Arabadji <aarabadji@productengine.com>
Date: Thu, 25 Mar 2010 17:53:25 +0200
Subject: [PATCH] =?UTF-8?q?fixed=20EXT-6489=20=E2=80=9C"User=20not=20onlin?=
 =?UTF-8?q?e=20-=20inventory=20has=20been=20saved"=20should=20be=20logged?=
 =?UTF-8?q?=20to=20IM=20log=E2=80=9D,=20reviewed=20by=20Mike=20Antipov=20a?=
 =?UTF-8?q?t=20https://codereview.productengine.com/secondlife/r/90/?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

--HG--
branch : product-engine
---
 indra/newview/llnotificationhandlerutil.cpp          |  9 ++++++---
 indra/newview/llviewermessage.cpp                    | 11 ++++-------
 indra/newview/skins/default/xui/en/notifications.xml |  7 +++++++
 3 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp
index 24cffd222b..6aafa04a17 100644
--- a/indra/newview/llnotificationhandlerutil.cpp
+++ b/indra/newview/llnotificationhandlerutil.cpp
@@ -128,7 +128,8 @@ const static std::string GRANTED_MODIFY_RIGHTS("GrantedModifyRights"),
 						FRIEND_ONLINE("FriendOnline"), FRIEND_OFFLINE("FriendOffline"),
 						SERVER_OBJECT_MESSAGE("ServerObjectMessage"),
 						TELEPORT_OFFERED("TeleportOffered"),
-						TELEPORT_OFFER_SENT("TeleportOfferSent");
+						TELEPORT_OFFER_SENT("TeleportOfferSent"),
+						IM_SYSTEM_MESSAGE_TIP("IMSystemMessageTip");
 
 
 // static
@@ -147,7 +148,8 @@ bool LLHandlerUtil::canLogToIM(const LLNotificationPtr& notification)
 			|| INVENTORY_DECLINED == notification->getName()
 			|| USER_GIVE_ITEM == notification->getName()
 			|| TELEPORT_OFFERED == notification->getName()
-			|| TELEPORT_OFFER_SENT == notification->getName();
+			|| TELEPORT_OFFER_SENT == notification->getName()
+			|| IM_SYSTEM_MESSAGE_TIP == notification->getName();
 }
 
 // static
@@ -157,7 +159,8 @@ bool LLHandlerUtil::canLogToNearbyChat(const LLNotificationPtr& notification)
 			&&  FRIEND_ONLINE != notification->getName()
 			&& FRIEND_OFFLINE != notification->getName()
 			&& INVENTORY_ACCEPTED != notification->getName()
-			&& INVENTORY_DECLINED != notification->getName();
+			&& INVENTORY_DECLINED != notification->getName()
+			&& IM_SYSTEM_MESSAGE_TIP != notification->getName();
 }
 
 // static
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 7ba9c54e53..6043ec4954 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -1752,17 +1752,15 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
 	std::string separator_string(": ");
 
 	LLSD args;
+	LLSD payload;
 	switch(dialog)
 	{
 	case IM_CONSOLE_AND_CHAT_HISTORY:
-		// These are used for system messages, hence don't need the name,
-		// as it is always "Second Life".
 	  	// *TODO: Translate
 		args["MESSAGE"] = message;
-
-		// Note: don't put the message in the IM history, even though was sent
-		// via the IM mechanism.
-		LLNotificationsUtil::add("SystemMessageTip",args);
+		payload["SESSION_NAME"] = name;
+		payload["from_id"] = from_id;
+		LLNotificationsUtil::add("IMSystemMessageTip",args, payload);
 		break;
 
 	case IM_NOTHING_SPECIAL: 
@@ -1985,7 +1983,6 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
 			// For requested notices, we don't want to send the popups.
 			if (dialog != IM_GROUP_NOTICE_REQUESTED)
 			{
-				LLSD payload;
 				payload["subject"] = subj;
 				payload["message"] = mes;
 				payload["sender_name"] = name;
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index c39a91281e..5403defc59 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -4269,6 +4269,13 @@ The string [STRING_NAME] is missing from strings.xml
    type="notifytip">
 [MESSAGE]
   </notification>
+  
+  <notification
+   icon="notifytip.tga"
+   name="IMSystemMessageTip"
+   type="notifytip">
+[MESSAGE]
+  </notification>
 
   <notification
    icon="notifytip.tga"
-- 
GitLab