diff options
author | Merov Linden <merov@lindenlab.com> | 2013-01-04 21:33:07 -0800 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2013-01-04 21:33:07 -0800 |
commit | 613b7a45a783f961a38d7135eb7eeafd572b13b9 (patch) | |
tree | 5a582d46f5a561cead702837b01ea7ae1af085a2 /indra/newview/llimview.cpp | |
parent | fbc414c02b80da1c0c5c1ebbbbcb84958938be6e (diff) | |
parent | 6153d09e52c5b41f69533cfe94af94d0f086c6ea (diff) |
Merge with viewer-chui
Diffstat (limited to 'indra/newview/llimview.cpp')
-rw-r--r-- | indra/newview/llimview.cpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 2bb79a39e8..0011f54175 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -101,6 +101,43 @@ BOOL LLSessionTimeoutTimer::tick() return TRUE; } + + +void process_dnd_im(const LLSD& notification) +{ + LLSD data = notification["substitutions"]; + LLUUID sessionID = data["SESSION_ID"].asUUID(); + + //re-create the IM session if needed + //(when coming out of DND mode upon app restart) + if(!gIMMgr->hasSession(sessionID)) + { + //reconstruct session using data from the notification + std::string name = data["FROM"]; + LLAvatarName av_name; + if (LLAvatarNameCache::get(data["FROM_ID"], &av_name)) + { + name = av_name.getDisplayName(); + } + + + LLIMModel::getInstance()->newSession(sessionID, + name, + IM_NOTHING_SPECIAL, + data["FROM_ID"], + false, + false); //will need slight refactor to retrieve whether offline message or not (assume online for now) + } + + //For now always flash conversation line item + LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container"); + im_box->flashConversationItemWidget(sessionID, true); + + //And flash toolbar button + gToolBarView->flashCommand(LLCommandId("chat"), true); +} + + static void on_avatar_name_cache_toast(const LLUUID& agent_id, const LLAvatarName& av_name, LLSD msg) |