From 7ed6eccffc7728b68f8df3bc28ee988bb733abc7 Mon Sep 17 00:00:00 2001 From: Northspring Date: Wed, 6 May 2015 22:33:13 +0200 Subject: [PATCH] FIRE-16035: Add an option to allow friends to bypass conference chat ignoring --- indra/newview/app_settings/settings.xml | 11 +++++++++ indra/newview/llimview.cpp | 24 ++++++++++++------- .../default/xui/en/panel_preferences_chat.xml | 10 ++++++++ .../default/xui/pl/panel_preferences_chat.xml | 1 + 4 files changed, 37 insertions(+), 9 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index ed79256903..e154361e16 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -22842,6 +22842,17 @@ Change of this parameter will affect the layout of buttons in notification toast Value 0 + FSDontIgnoreAdHocFromFriends + + Comment + Allow my friends to start conference chats with me. + Persist + 1 + Type + Boolean + Value + 0 + FSFriendListColumnShowUserName Comment diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 7adf6870c3..ad8a0cbd9a 100755 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -3092,18 +3092,24 @@ void LLIMMgr::addMessage( } // Option to automatically ignore and leave all conference (ad-hoc) chats - if (dialog != IM_NOTHING_SPECIAL && !is_group_chat && gSavedSettings.getBOOL("FSIgnoreAdHocSessions") && !from_linden) + static LLCachedControl ignoreAdHocSessions(gSavedSettings, "FSIgnoreAdHocSessions"); + if (dialog != IM_NOTHING_SPECIAL && !is_group_chat && ignoreAdHocSessions && !from_linden) { - LL_INFOS() << "Ignoring conference (ad-hoc) chat from " << new_session_id.asString() << LL_ENDL; - if (!gIMMgr->leaveSession(new_session_id)) + static LLCachedControl dontIgnoreAdHocFromFriends(gSavedSettings, "FSDontIgnoreAdHocFromFriends"); + if (!dontIgnoreAdHocFromFriends || (dontIgnoreAdHocFromFriends && LLAvatarTracker::instance().getBuddyInfo(other_participant_id) == NULL)) { - LL_WARNS() << "Ad-hoc session " << new_session_id.asString() << " does not exist." << LL_ENDL; + static LLCachedControl reportIgnoredAdHocSession(gSavedSettings, "FSReportIgnoredAdHocSession"); + LL_INFOS() << "Ignoring conference (ad-hoc) chat from " << new_session_id.asString() << LL_ENDL; + if (!gIMMgr->leaveSession(new_session_id)) + { + LL_WARNS() << "Ad-hoc session " << new_session_id.asString() << " does not exist." << LL_ENDL; + } + else if (reportIgnoredAdHocSession) + { + reportToNearbyChat(LLTrans::getString("IgnoredAdHocSession")); + } + return; } - if (gSavedSettings.getBOOL("FSReportIgnoredAdHocSession")) - { - reportToNearbyChat(LLTrans::getString("IgnoredAdHocSession")); - } - return; } // diff --git a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml index b4927a3b9d..7c6892227d 100755 --- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml @@ -715,6 +715,16 @@ name="FSReportIgnoredAdHocSession" control_name="FSReportIgnoredAdHocSession" label="Report ignored conference chats in nearby chat"/> + + Długość tymczasowego wyciszenia czatu grupowego: