From 86609394caf1ebb20dd90de37b9af1471ae8aa20 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Fri, 29 Jan 2010 17:48:10 +0200 Subject: =?UTF-8?q?fixed=20major=20EXT-3643=20=E2=80=9CEmbed=20friendship?= =?UTF-8?q?=20offer=20into=20IM=20window=E2=80=9D;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llnotificationofferhandler.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'indra/newview/llnotificationofferhandler.cpp') 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()); } } -- cgit v1.2.3