diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp index 67c7d5058c29d3609f81a7b4316ce935482099ec..5ee6ee846e708f6bb4744c381b7b47391db4a01c 100644 --- a/indra/newview/llimprocessing.cpp +++ b/indra/newview/llimprocessing.cpp @@ -1241,7 +1241,7 @@ void LLIMProcessing::processNewMessage(LLUUID from_id, // should happen after you get an "invitation" // if (!gIMMgr->hasSession(session_id)) // [SL:KB] - Patch: Chat-GroupSnooze | Checked: Catznip-3.3 - if ( (!gIMMgr->hasSession(session_id)) && ( (!gAgent.isInGroup(session_id)) || (!gIMMgr->checkSnoozeExpiration(session_id)) || (!gIMMgr->restoreSnoozedSession(session_id)) ) ) + if (!gIMMgr->hasSession(session_id) && (!gAgent.isInGroup(session_id) || (!gIMMgr->checkSnoozeExpiration(session_id) || !gIMMgr->restoreSnoozedSession(session_id))) ) // [/SL:KB] { return; @@ -1845,7 +1845,6 @@ void LLIMProcessing::requestOfflineMessagesCoro(std::string url) from_group = message_data["from_group"].asString() == "Y"; } - LLIMProcessing::processNewMessage( message_data["from_agent_id"].asUUID(), from_group, diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 030939e924d38ca20d22dddcd4c5844b59e40312..54b29cd5b0dde97d39194f1463f4b143f322a7ad 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1652,9 +1652,6 @@ LLIMModel::LLIMSession* LLIMModel::addMessageSilently(const LLUUID& session_id, || INTERACTIVE_SYSTEM_FROM == from) { ++(session->mParticipantUnreadMessageCount); -// [SL:KB] - Patch: Chat-GroupSnooze | Checked: Catznip-3.3 - session->mParticipantLastMessageTime = LLDate::now(); -// [/SL:K] } return session; @@ -3452,11 +3449,12 @@ bool LLIMMgr::leaveSession(const LLUUID& session_id) nSnoozeDuration = ((pOptions) && (pOptions->mSnoozeOnClose)) ? pOptions->mSnoozeDuration * 60 : s_nSnoozeTime; } + F64 expirationTime = LLTimer::getTotalSeconds() + F64(nSnoozeDuration); snoozed_sessions_t::iterator itSession = mSnoozedSessions.find(session_id); if (mSnoozedSessions.end() != itSession) - itSession->second = im_session->mParticipantLastMessageTime.secondsSinceEpoch() + static_cast<F64>(nSnoozeDuration); + itSession->second = expirationTime; else - mSnoozedSessions.emplace(session_id, im_session->mParticipantLastMessageTime.secondsSinceEpoch() + static_cast<F64>(nSnoozeDuration)); + mSnoozedSessions.emplace(session_id, expirationTime); } else { @@ -3653,7 +3651,7 @@ BOOL LLIMMgr::hasSession(const LLUUID& session_id) bool LLIMMgr::checkSnoozeExpiration(const LLUUID& session_id) const { snoozed_sessions_t::const_iterator itSession = mSnoozedSessions.find(session_id); - return (mSnoozedSessions.end() != itSession) && (itSession->second < LLTimer::getTotalSeconds()); + return (mSnoozedSessions.end() != itSession) && (itSession->second <= LLTimer::getTotalSeconds()); } bool LLIMMgr::isSnoozedSession(const LLUUID& session_id) const @@ -3676,7 +3674,10 @@ bool LLIMMgr::restoreSnoozedSession(const LLUUID& session_id) uuid_vec_t ids; LLIMModel::sendStartSession(session_id, session_id, ids, IM_SESSION_GROUP_START); - make_ui_sound("UISndStartIM"); + if(!gAgent.isDoNotDisturb()) + { + make_ui_sound("UISndStartIM"); + } return true; } } diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index 5785f8ef4d8aa9667c67abb15fe03c77df8c955d..8476504bb6438ab3666a79d6566525c341ba403d 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -145,10 +145,6 @@ class LLIMModel final : public LLSingleton<LLIMModel> // connection to voice channel state change signal boost::signals2::connection mVoiceChannelStateChangeConnection; -// [SL:KB] - Patch: Chat-GroupSnooze | Checked: Catznip-3.3 - LLDate mParticipantLastMessageTime = LLDate::now(); -// [/SL:KB] - //does NOT include system messages and agent's messages S32 mParticipantUnreadMessageCount;