FIRE-6304: Added option to notify about muted group chat

Ansariel 2013-03-24 14:33:22 +01:00
parent 3ce418babe
commit c43c62d152
6 changed files with 46 additions and 2 deletions

View File

@ -20193,5 +20193,16 @@ Change of this parameter will affect the layout of buttons in notification toast
<key>Value</key>
<integer>0</integer>
</map>
<key>FSReportMutedGroupChat</key>
<map>
<key>Comment</key>
<string>Reports to nearby chat if a group chat has been muted.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
</map>
</llsd>

View File

@ -78,6 +78,7 @@
#include "exogroupmutelist.h"
#include "fsconsoleutils.h"
#include "fscommon.h"
const static std::string ADHOC_NAME_SUFFIX(" Conference");
@ -2681,6 +2682,13 @@ void LLIMMgr::addMessage(
if (exoGroupMuteList::instance().isMuted(new_session_id))
{
llinfos << "Muting group chat from " << new_session_id.asString() << ": " << fixed_session_name << llendl;
if (gSavedSettings.getBOOL("FSReportMutedGroupChat"))
{
LLStringUtil::format_map_t args;
args["NAME"] = fixed_session_name;
reportToNearbyChat(LLTrans::getString("GroupChatMuteNotice", args));
}
clearPendingInvitation(new_session_id);
clearPendingAgentListUpdates(new_session_id);
LLIMModel::getInstance()->sendLeaveSession(new_session_id, other_participant_id);
@ -3724,6 +3732,13 @@ public:
if (FSMuteAllGroups || (FSMuteGroupWhenNoticesDisabled && !group_data.mAcceptNotices))
{
llinfos << "Firestorm: muting group chat: " << group_data.mName << LL_ENDL;
if (gSavedSettings.getBOOL("FSReportMutedGroupChat"))
{
LLStringUtil::format_map_t args;
args["NAME"] = group_data.mName;
reportToNearbyChat(LLTrans::getString("GroupChatMuteNotice", args));
}
//KC: make sure we leave the group chat at the server end as well
std::string aname;

View File

@ -114,6 +114,7 @@
<spinner tool_tip="0.25-1.0, 0.25 für maximales Ausblenden für 1 für kein Ausblenden" name="FSIMChatHistoryFade"/>
<check_box name="FSAnnounceIncomingIM" label="Eingehende Instant Messages ankünden sobald Sender zu schreiben beginnt"/>
<check_box name="FSIMChatFlashOnFriendStatusChange" label="Blinkende IM-Reiter, wenn Freunde sich an- oder abmelden"/>
<check_box name="FSReportMutedGroupChat" label="Stummgeschalteten Gruppenchat im lokalen Chat melden"/>
<text name="WhenPlayIMLabel" width="205">
Beim Eintreffen von Instant Messages:
</text>

View File

@ -5632,4 +5632,8 @@ Setzen Sie den Editorpfad in Anführungszeichen
<string name="QP_WL_None">
Keiner
</string>
<string name="GroupChatMuteNotice">
Ignoriere Gruppenchat von [NAME].
</string>
</strings>

View File

@ -613,14 +613,25 @@
<check_box
layout="topleft"
follows="left|top"
top_pad="6"
top_pad="1"
left="30"
width="400"
height="18"
name="FSIMChatFlashOnFriendStatusChange"
control_name="FSIMChatFlashOnFriendStatusChange"
label="Flash IM tabs when friends come online or go offline"/>
<check_box
layout="topleft"
follows="left|top"
top_pad="1"
left="30"
width="400"
height="18"
name="FSReportMutedGroupChat"
control_name="FSReportMutedGroupChat"
label="Report muted group chat in nearby chat"/>
<text
follows="left|top"
layout="topleft"

View File

@ -5064,4 +5064,6 @@ Try enclosing path to the editor with double quotes.
<string name="QP_WL_Region_Default">Region default</string>
<string name="QP_WL_Day_Cycle_Based">Day cycle based</string>
<string name="QP_WL_None">None</string>
<string name="GroupChatMuteNotice">Muting group chat from [NAME].</string>
</strings>