summaryrefslogtreecommitdiff
path: root/indra/newview/lldonotdisturbnotificationstorage.cpp
diff options
context:
space:
mode:
authormberezhnoy <mberezhnoy@productengine.com>2013-03-20 11:10:46 +0200
committermberezhnoy <mberezhnoy@productengine.com>2013-03-20 11:10:46 +0200
commit72af9ed2e3e969b286052603928987311c271cdf (patch)
tree188c38fefc1ae4d05e6c7def70d4c3fe5648dacd /indra/newview/lldonotdisturbnotificationstorage.cpp
parent0c5ff7eb4870ac2ec933bd624e6969dbea862dbb (diff)
parent2a8baeed3a2dc67abff131249aa23538e76fb05d (diff)
merge
Diffstat (limited to 'indra/newview/lldonotdisturbnotificationstorage.cpp')
-rw-r--r--indra/newview/lldonotdisturbnotificationstorage.cpp25
1 files changed, 23 insertions, 2 deletions
diff --git a/indra/newview/lldonotdisturbnotificationstorage.cpp b/indra/newview/lldonotdisturbnotificationstorage.cpp
index 22f35752bd..be20adeb8a 100644
--- a/indra/newview/lldonotdisturbnotificationstorage.cpp
+++ b/indra/newview/lldonotdisturbnotificationstorage.cpp
@@ -33,6 +33,7 @@
#include "lldir.h"
#include "llerror.h"
#include "llfloaterreg.h"
+#include "llimview.h"
#include "llnotifications.h"
#include "llnotificationhandler.h"
#include "llnotificationstorage.h"
@@ -145,6 +146,8 @@ void LLDoNotDisturbNotificationStorage::loadNotifications()
LLNotifications& instance = LLNotifications::instance();
bool imToastExists = false;
+ bool group_ad_hoc_toast_exists = false;
+ S32 toastSessionType;
bool offerExists = false;
for (LLSD::array_const_iterator notification_it = data.beginArray();
@@ -158,7 +161,20 @@ void LLDoNotDisturbNotificationStorage::loadNotifications()
if(notificationName == toastName)
{
- imToastExists = true;
+ toastSessionType = notification_params["payload"]["SESSION_TYPE"];
+ if(toastSessionType == LLIMModel::LLIMSession::P2P_SESSION)
+ {
+ imToastExists = true;
+ }
+ //Don't add group/ad-hoc messages to the notification system because
+ //this means the group/ad-hoc session has to be re-created
+ else if(toastSessionType == LLIMModel::LLIMSession::GROUP_SESSION
+ || toastSessionType == LLIMModel::LLIMSession::ADHOC_SESSION)
+ {
+ //Just allows opening the conversation log for group/ad-hoc messages upon startup
+ group_ad_hoc_toast_exists = true;
+ continue;
+ }
}
else if(notificationName == offerName)
{
@@ -197,7 +213,12 @@ void LLDoNotDisturbNotificationStorage::loadNotifications()
LLFloaterReg::showInstance("im_container");
}
- if(imToastExists || offerExists)
+ if(group_ad_hoc_toast_exists)
+ {
+ LLFloaterReg::showInstance("conversation");
+ }
+
+ if(imToastExists || group_ad_hoc_toast_exists || offerExists)
{
make_ui_sound_deferred("UISndNewIncomingIMSession");
}