summaryrefslogtreecommitdiff
path: root/indra/newview/llnotificationofferhandler.cpp
diff options
context:
space:
mode:
authorAlexei Arabadji <aarabadji@productengine.com>2009-12-04 18:34:32 +0200
committerAlexei Arabadji <aarabadji@productengine.com>2009-12-04 18:34:32 +0200
commit63096e40de74b6540a87773cc0449a8a12bafb5b (patch)
tree91f1113af0ef82041d11a39b404ed2560a31498f /indra/newview/llnotificationofferhandler.cpp
parent69cd9ac98bde4d602a8bdb785ac576df958ea1f5 (diff)
parent28a1ee9da8d58955590e3596409d2f49b130e1fc (diff)
Automated merge with https://hg.aws.productengine.com/secondlife/viewer-2-0/
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llnotificationofferhandler.cpp')
-rw-r--r--indra/newview/llnotificationofferhandler.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp
index 4f353bf6a5..b7f95ae2fa 100644
--- a/indra/newview/llnotificationofferhandler.cpp
+++ b/indra/newview/llnotificationofferhandler.cpp
@@ -40,6 +40,7 @@
#include "llnotificationmanager.h"
#include "llnotifications.h"
#include "llscriptfloater.h"
+#include "llimview.h"
using namespace LLNotificationsUI;
@@ -101,6 +102,26 @@ bool LLOfferHandler::processNotification(const LLSD& notify)
}
else
{
+ if (LLHandlerUtil::canSpawnIMSession(notification))
+ {
+ const std::string name = notification->getSubstitutions().has(
+ "NAME") ? notification->getSubstitutions()["NAME"]
+ : notification->getSubstitutions()["[NAME]"];
+
+ LLUUID from_id = notification->getPayload()["from_id"];
+
+ LLUUID session_id = LLIMMgr::computeSessionID(
+ IM_NOTHING_SPECIAL, from_id);
+
+ LLIMModel::LLIMSession* session =
+ LLIMModel::instance().findIMSession(session_id);
+ if (session == NULL)
+ {
+ LLIMMgr::instance().addSession(name, IM_NOTHING_SPECIAL,
+ from_id);
+ }
+ }
+
LLToastNotifyPanel* notify_box = new LLToastNotifyPanel(notification);
LLToast::Params p;