diff options
author | maxim@mnikolenko <maxim@mnikolenko> | 2014-03-14 12:21:25 +0200 |
---|---|---|
committer | maxim@mnikolenko <maxim@mnikolenko> | 2014-03-14 12:21:25 +0200 |
commit | 09d1c27d4f78c78d949b6a3d896d6f58df2dfc06 (patch) | |
tree | 2366f6ff31289a27092bef9e9fb2db272f17eb60 /indra/newview/llimview.cpp | |
parent | cb91708332b8b8ddfe27808602ec5f43f11c24c2 (diff) |
MAINT-3822 FIXED Show busy mode message only once for each im session.
Diffstat (limited to 'indra/newview/llimview.cpp')
-rwxr-xr-x | indra/newview/llimview.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 70ffdc14ff..d55922af93 100755 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -409,6 +409,7 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& mOtherParticipantIsAvatar(true), mStartCallOnInitialize(false), mStartedAsIMCall(voice), + mIsDNDsend(false), mAvatarNameCacheConnection() { // set P2P type by default @@ -3306,6 +3307,38 @@ bool LLIMMgr::isVoiceCall(const LLUUID& session_id) return im_session->mStartedAsIMCall; } +void LLIMMgr::updateDNDMessageStatus() +{ + if (LLIMModel::getInstance()->mId2SessionMap.empty()) return; + + std::map<LLUUID, LLIMModel::LLIMSession*>::const_iterator it = LLIMModel::getInstance()->mId2SessionMap.begin(); + for (; it != LLIMModel::getInstance()->mId2SessionMap.end(); ++it) + { + LLIMModel::LLIMSession* session = (*it).second; + + if (session->isP2P()) + { + setDNDMessageSent(session->mSessionID,false); + } + } +} + +bool LLIMMgr::isDNDMessageSend(const LLUUID& session_id) +{ + LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(session_id); + if (!im_session) return false; + + return im_session->mIsDNDsend; +} + +void LLIMMgr::setDNDMessageSent(const LLUUID& session_id, bool is_send) +{ + LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(session_id); + if (!im_session) return; + + im_session->mIsDNDsend = is_send; +} + void LLIMMgr::addNotifiedNonFriendSessionID(const LLUUID& session_id) { mNotifiedNonFriendSessions.insert(session_id); |