From aa524b18e5486b19aede990cb30fb89a0b48c083 Mon Sep 17 00:00:00 2001 From: "maxim@mnikolenko" Date: Mon, 28 Jan 2013 14:57:51 +0200 Subject: CHUI-701 FIXED Don't show toasts and flashing, if conversation is opened but isn't focused. --- indra/newview/llimview.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index cb03c1d234..433ddad35d 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -204,19 +204,16 @@ void on_new_message(const LLSD& msg) bool conversation_floater_not_focused = conversation_floater_is_closed || !im_box->hasFocus(); + // Skip toasting and flashing if we have open window of IM with this session id + if (session_floater + && session_floater->isInVisibleChain() + && !session_floater->isMinimized() + && !(session_floater->getHost() && session_floater->getHost()->isMinimized())) + { + return; + } if ("toast" == action) { - // Skip toasting and flashing if we have open window of IM with this session id - if (session_floater - && session_floater->isInVisibleChain() - && session_floater->hasFocus() - && !session_floater->isMinimized() - && !(session_floater->getHost() && session_floater->getHost()->isMinimized()) - ) - { - return; - } - //User is not focused on conversation containing the message if(session_floater_not_focused) { -- cgit v1.2.3 From 2ac99f55f9e562e4ff8ebde4cba8270f1048c28d Mon Sep 17 00:00:00 2001 From: maksymsproductengine Date: Thu, 24 Jan 2013 19:56:13 +0200 Subject: CHUI-578 FIXED Move preferences for conversation logs/transcripts to chat tab --- indra/newview/llimview.cpp | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 433ddad35d..37c9ee8c99 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -378,15 +378,7 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& } buildHistoryFileName(); - - if ( gSavedPerAccountSettings.getBOOL("LogShowHistory") ) - { - std::list chat_history; - - //involves parsing of a chat history - LLLogChat::loadChatHistory(mHistoryFileName, chat_history); - addMessagesFromHistory(chat_history); - } + loadHistory(); // Localizing name of ad-hoc session. STORM-153 // Changing name should happen here- after the history file was created, so that @@ -579,11 +571,11 @@ void LLIMModel::LLIMSession::addMessagesFromHistory(const std::list& histo { const LLSD& msg = *it; - std::string from = msg[IM_FROM]; + std::string from = msg[LL_IM_FROM]; LLUUID from_id; - if (msg[IM_FROM_ID].isDefined()) + if (msg[LL_IM_FROM_ID].isDefined()) { - from_id = msg[IM_FROM_ID].asUUID(); + from_id = msg[LL_IM_FROM_ID].asUUID(); } else { @@ -592,8 +584,8 @@ void LLIMModel::LLIMSession::addMessagesFromHistory(const std::list& histo gCacheName->getUUID(legacy_name, from_id); } - std::string timestamp = msg[IM_TIME]; - std::string text = msg[IM_TEXT]; + std::string timestamp = msg[LL_IM_TIME]; + std::string text = msg[LL_IM_TEXT]; addMessage(from, from_id, text, timestamp, true); @@ -617,6 +609,20 @@ void LLIMModel::LLIMSession::chatFromLogFile(LLLogChat::ELogLineType type, const } } +void LLIMModel::LLIMSession::loadHistory() +{ + mMsgs.clear(); + + if ( gSavedPerAccountSettings.getBOOL("LogShowHistory") ) + { + std::list chat_history; + + //involves parsing of a chat history + LLLogChat::loadChatHistory(mHistoryFileName, chat_history); + addMessagesFromHistory(chat_history); + } +} + LLIMModel::LLIMSession* LLIMModel::findIMSession(const LLUUID& session_id) const { return get_if_there(mId2SessionMap, session_id, @@ -921,8 +927,7 @@ bool LLIMModel::addToHistory(const LLUUID& session_id, const std::string& from, bool LLIMModel::logToFile(const std::string& file_name, const std::string& from, const LLUUID& from_id, const std::string& utf8_text) { - if (gSavedPerAccountSettings.getBOOL("LogInstantMessages") - && gSavedSettings.getBOOL("KeepConversationLogTranscripts")) + if (gSavedSettings.getS32("KeepConversationLogTranscripts") > 1) { std::string from_name = from; -- cgit v1.2.3 From fa54b50e029c963d90b5533174a29eefc22227e5 Mon Sep 17 00:00:00 2001 From: Cho Date: Sat, 26 Jan 2013 00:19:29 +0000 Subject: CHUI-644 FIX [CHUIBUG]Received IM's Don't Always Appear in Communication Console Immediately. Added call to LLFloaterIMContainer::selectConversation() in on_new_message for LLIMView --- indra/newview/llimview.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index cb03c1d234..c94f2e967e 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -144,7 +144,7 @@ static void on_avatar_name_cache_toast(const LLUUID& agent_id, args["FROM"] = av_name.getCompleteName(); args["FROM_ID"] = msg["from_id"]; args["SESSION_ID"] = msg["session_id"]; - LLNotificationsUtil::add("IMToast", args, args, boost::bind(&LLFloaterIMContainer::showConversation, LLFloaterIMContainer::getInstance(), msg["session_id"].asUUID())); + LLNotificationsUtil::add("IMToast", args, LLSD(), boost::bind(&LLFloaterIMContainer::showConversation, LLFloaterIMContainer::getInstance(), msg["session_id"].asUUID())); } void on_new_message(const LLSD& msg) @@ -239,6 +239,12 @@ void on_new_message(const LLSD& msg) { LLAvatarNameCache::get(participant_id, boost::bind(&on_avatar_name_cache_toast, _1, _2, msg)); } + + // Make sure the message actually appears, without having to click on the conversation + if(!conversation_floater_is_closed) + { + im_box->selectConversation(session_id); + } } } } @@ -276,9 +282,9 @@ void on_new_message(const LLSD& msg) if(!gAgent.isDoNotDisturb()) { - //Surface conversations floater - LLFloaterReg::showInstance("im_container"); - } + //Surface conversations floater + LLFloaterReg::showInstance("im_container"); + } //If in DND mode, allow notification to be stored so upon DND exit //useMostItrusiveIMNotification will be called to notify user a message exists @@ -287,8 +293,8 @@ void on_new_message(const LLSD& msg) && gAgent.isDoNotDisturb()) { LLAvatarNameCache::get(participant_id, boost::bind(&on_avatar_name_cache_toast, _1, _2, msg)); - } -} + } + } } } -- cgit v1.2.3 From c1b8e4b1ffcb9c759d109d603004f363dbb0df63 Mon Sep 17 00:00:00 2001 From: Cho Date: Sat, 26 Jan 2013 00:36:49 +0000 Subject: undid accidental revert of someone else's fix --- indra/newview/llimview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index c94f2e967e..acbf5fcde4 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -144,7 +144,7 @@ static void on_avatar_name_cache_toast(const LLUUID& agent_id, args["FROM"] = av_name.getCompleteName(); args["FROM_ID"] = msg["from_id"]; args["SESSION_ID"] = msg["session_id"]; - LLNotificationsUtil::add("IMToast", args, LLSD(), boost::bind(&LLFloaterIMContainer::showConversation, LLFloaterIMContainer::getInstance(), msg["session_id"].asUUID())); + LLNotificationsUtil::add("IMToast", args, args, boost::bind(&LLFloaterIMContainer::showConversation, LLFloaterIMContainer::getInstance(), msg["session_id"].asUUID())); } void on_new_message(const LLSD& msg) -- cgit v1.2.3 From 44b681f5db9435f98d52525621aa98b0a8ed3063 Mon Sep 17 00:00:00 2001 From: Cho Date: Tue, 29 Jan 2013 00:16:40 +0000 Subject: CHUI-644 FIX [CHUIBUG]Received IM's Don't Always Appear in Communication Console Immediately. Removed new code from on_new_message in LLIMView and instead, changed condition in LLFloaterIMSession::newIMCallback to update messages whenever the floater is visible --- indra/newview/llimview.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index acbf5fcde4..ffbb8471c2 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -239,14 +239,8 @@ void on_new_message(const LLSD& msg) { LLAvatarNameCache::get(participant_id, boost::bind(&on_avatar_name_cache_toast, _1, _2, msg)); } - - // Make sure the message actually appears, without having to click on the conversation - if(!conversation_floater_is_closed) - { - im_box->selectConversation(session_id); - } } - } + } } else if ("flash" == action) -- cgit v1.2.3 From edb5be4ec0a88931933a27dc7e94d45ea249591d Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Tue, 29 Jan 2013 14:41:37 -0800 Subject: CHUI-88 I shouldn't see Conference IMs from people I muted. Fix: In order to mute a user who initiated a conference/group chat, the session must be created on the server side and then left. --- indra/newview/llimview.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 8f010850f7..3a5743f309 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -3454,12 +3454,10 @@ public: (time_t) message_params["timestamp"].asInteger(); BOOL is_do_not_disturb = gAgent.isDoNotDisturb(); - BOOL is_muted = LLMuteList::getInstance()->isMuted( - from_id, - name, - LLMute::flagTextChat); - if (is_do_not_disturb || is_muted) + //don't return if user is muted b/c proper way to ignore a muted user who + //initiated an adhoc/group conference is to create then leave the session (see STORM-1731) + if (is_do_not_disturb) { return; } -- cgit v1.2.3 From df84e3c1876c5d2b321f0a8596e7e2a936073156 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Tue, 29 Jan 2013 17:47:34 -0800 Subject: CHUI-436 : Fixed : Do not skip yourself or group chat when checked Only friends and groups can call or IM me pref. --- indra/newview/llimview.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'indra/newview/llimview.cpp') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 8f010850f7..4a1b15f82b 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -2610,8 +2610,15 @@ void LLIMMgr::addMessage( } } - bool skip_message = (gSavedSettings.getBOOL("VoiceCallsFriendsOnly") && - LLAvatarTracker::instance().getBuddyInfo(other_participant_id) == NULL); + bool skip_message = false; + if (gSavedSettings.getBOOL("VoiceCallsFriendsOnly")) + { + // Evaluate if we need to skip this message when that setting is true (default is false) + LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession(session_id); + skip_message = (LLAvatarTracker::instance().getBuddyInfo(other_participant_id) == NULL); // Skip non friends... + skip_message &= !session->isGroupSessionType(); // Do not skip group chats... + skip_message &= !(other_participant_id == gAgentID); // You are your best friend... Don't skip yourself + } if (!LLMuteList::getInstance()->isMuted(other_participant_id, LLMute::flagTextChat) && !skip_message) { -- cgit v1.2.3