summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexei Arabadji <aarabadji@productengine.com>2010-03-05 17:53:32 +0200
committerAlexei Arabadji <aarabadji@productengine.com>2010-03-05 17:53:32 +0200
commit2f9cc80c2e0a6ca648871ed74cc10b813d2c4940 (patch)
treefa1ae5d5e973caba2f28ee7d3d37a194d20aaf2f
parent27283c1de73282590e614b3d5e9bdabe922c0a94 (diff)
fixed EXT-5910 “Offers logging”,
fixed IM message counter when received interactive notification(offer); corrected logging to file of offer notification; enabled logging for FRIENDSHIP_ACCEPTED notification; --HG-- branch : product-engine
-rw-r--r--indra/llmessage/llinstantmessage.cpp1
-rw-r--r--indra/llmessage/llinstantmessage.h1
-rw-r--r--indra/newview/llimview.cpp4
-rw-r--r--indra/newview/llnotificationhandlerutil.cpp7
-rw-r--r--indra/newview/llnotificationofferhandler.cpp16
5 files changed, 22 insertions, 7 deletions
diff --git a/indra/llmessage/llinstantmessage.cpp b/indra/llmessage/llinstantmessage.cpp
index a9e1ee77ef..57e8a22546 100644
--- a/indra/llmessage/llinstantmessage.cpp
+++ b/indra/llmessage/llinstantmessage.cpp
@@ -61,6 +61,7 @@ const char EMPTY_BINARY_BUCKET[] = "";
const S32 EMPTY_BINARY_BUCKET_SIZE = 1;
const U32 NO_TIMESTAMP = 0;
const std::string SYSTEM_FROM("Second Life");
+const std::string INTERACTIVE_SYSTEM_FROM("F387446C-37C4-45f2-A438-D99CBDBB563B");
const S32 IM_TTL = 1;
diff --git a/indra/llmessage/llinstantmessage.h b/indra/llmessage/llinstantmessage.h
index 272e753f3c..f11b649f78 100644
--- a/indra/llmessage/llinstantmessage.h
+++ b/indra/llmessage/llinstantmessage.h
@@ -226,6 +226,7 @@ extern const S32 EMPTY_BINARY_BUCKET_SIZE;
extern const U32 NO_TIMESTAMP;
extern const std::string SYSTEM_FROM;
+extern const std::string INTERACTIVE_SYSTEM_FROM;
// Number of retry attempts on sending the im.
extern const S32 IM_TTL;
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index b3f085ef6d..9ea8364491 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -723,7 +723,9 @@ LLIMModel::LLIMSession* LLIMModel::addMessageSilently(const LLUUID& session_id,
session->mNumUnread++;
//update count of unread messages from real participant
- if (!(from_id.isNull() || from_id == gAgentID || SYSTEM_FROM == from))
+ if (!(from_id.isNull() || from_id == gAgentID || SYSTEM_FROM == from)
+ // we should increment counter for interactive system messages()
+ || INTERACTIVE_SYSTEM_FROM == from)
{
++(session->mParticipantUnreadMessageCount);
}
diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp
index 8d1c244a7e..7b61b200cd 100644
--- a/indra/newview/llnotificationhandlerutil.cpp
+++ b/indra/newview/llnotificationhandlerutil.cpp
@@ -139,6 +139,7 @@ bool LLHandlerUtil::canLogToIM(const LLNotificationPtr& notification)
|| PAYMENT_RECIVED == notification->getName()
|| OFFER_FRIENDSHIP == notification->getName()
|| FRIENDSHIP_OFFERED == notification->getName()
+ || FRIENDSHIP_ACCEPTED == notification->getName()
|| FRIENDSHIP_ACCEPTED_BYME == notification->getName()
|| FRIENDSHIP_DECLINED_BYME == notification->getName()
|| SERVER_OBJECT_MESSAGE == notification->getName()
@@ -274,12 +275,12 @@ void LLHandlerUtil::logToIMP2P(const LLNotificationPtr& notification, bool to_fi
if(to_file_only)
{
- logToIM(IM_NOTHING_SPECIAL, session_name, name, notification->getMessage(),
- LLUUID(), LLUUID());
+ logToIM(IM_NOTHING_SPECIAL, session_name, "", notification->getMessage(),
+ from_id, LLUUID());
}
else
{
- logToIM(IM_NOTHING_SPECIAL, session_name, "", notification->getMessage(),
+ logToIM(IM_NOTHING_SPECIAL, session_name, INTERACTIVE_SYSTEM_FROM, notification->getMessage(),
from_id, LLUUID());
}
}
diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp
index 3304d7f030..97a1df66df 100644
--- a/indra/newview/llnotificationofferhandler.cpp
+++ b/indra/newview/llnotificationofferhandler.cpp
@@ -156,7 +156,14 @@ bool LLOfferHandler::processNotification(const LLSD& notify)
if (LLHandlerUtil::canLogToIM(notification))
{
- LLHandlerUtil::logToIMP2P(notification);
+ if (LLHandlerUtil::isIMFloaterOpened(notification))
+ {
+ LLHandlerUtil::logToIMP2P(notification, true);
+ }
+ else
+ {
+ LLHandlerUtil::logToIMP2P(notification);
+ }
}
// update IM floater messages if need
@@ -192,8 +199,11 @@ bool LLOfferHandler::processNotification(const LLSD& notify)
void LLOfferHandler::onDeleteToast(LLToast* toast)
{
- // send a signal to the counter manager
- mDelNotificationSignal();
+ if (!LLHandlerUtil::canAddNotifPanelToIM(toast->getNotification()))
+ {
+ // send a signal to the counter manager
+ mDelNotificationSignal();
+ }
// send a signal to a listener to let him perform some action
// in this case listener is a SysWellWindow and it will remove a corresponding item from its list