summaryrefslogtreecommitdiff
path: root/indra/newview/llnotificationofferhandler.cpp
diff options
context:
space:
mode:
authorCG Linden <cg@lindenlab.com>2010-01-29 16:29:12 -0800
committerCG Linden <cg@lindenlab.com>2010-01-29 16:29:12 -0800
commitf6a59081a7959e21f952a93bc3809315f2fa361e (patch)
treed77373c86810e505892cfb483001fe535201db46 /indra/newview/llnotificationofferhandler.cpp
parentb8856efd5ff0e4899bb369dfd0815e824cd3a432 (diff)
parent682f8afcc073b62fed64a3fd2adc5f65793e1f3e (diff)
Merge in latest viewer-2-0 changes.
Diffstat (limited to 'indra/newview/llnotificationofferhandler.cpp')
-rw-r--r--indra/newview/llnotificationofferhandler.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp
index fad0c6a91e..8c13b0fafa 100644
--- a/indra/newview/llnotificationofferhandler.cpp
+++ b/indra/newview/llnotificationofferhandler.cpp
@@ -93,7 +93,7 @@ bool LLOfferHandler::processNotification(const LLSD& notify)
if(notify["sigtype"].asString() == "add" || notify["sigtype"].asString() == "change")
{
- LLHandlerUtil::logToIMP2P(notification);
+
if( notification->getPayload().has("give_inventory_notification")
&& !notification->getPayload()["give_inventory_notification"] )
@@ -103,18 +103,25 @@ bool LLOfferHandler::processNotification(const LLSD& notify)
}
else
{
+ LLUUID session_id;
if (LLHandlerUtil::canSpawnIMSession(notification))
{
const std::string name = LLHandlerUtil::getSubstitutionName(notification);
LLUUID from_id = notification->getPayload()["from_id"];
- LLHandlerUtil::spawnIMSession(name, from_id);
+ session_id = LLHandlerUtil::spawnIMSession(name, from_id);
}
- if (notification->getPayload().has("SUPPRESS_TOAST")
+ if (LLHandlerUtil::canAddNotifPanelToIM(notification))
+ {
+ LLHandlerUtil::addNotifPanelToIM(notification);
+ LLHandlerUtil::logToIMP2P(notification, true);
+ }
+ else if (notification->getPayload().has("SUPPRESS_TOAST")
&& notification->getPayload()["SUPPRESS_TOAST"])
{
+ LLHandlerUtil::logToIMP2P(notification);
LLNotificationsUtil::cancel(notification);
}
else
@@ -131,6 +138,8 @@ bool LLOfferHandler::processNotification(const LLSD& notify)
if(channel)
channel->addToast(p);
+ LLHandlerUtil::logToIMP2P(notification);
+
// send a signal to the counter manager
mNewNotificationSignal();
}
@@ -146,6 +155,10 @@ bool LLOfferHandler::processNotification(const LLSD& notify)
}
else
{
+ if (LLHandlerUtil::canAddNotifPanelToIM(notification))
+ {
+ LLHandlerUtil::reloadIMFloaterMessages(notification);
+ }
mChannel->killToastByNotificationID(notification->getID());
}
}