Skip to content
Snippets Groups Projects
Commit 91eaefd3 authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Add report abuse option to chat menus

parent fd833787
No related branches found
No related tags found
No related merge requests found
...@@ -435,6 +435,10 @@ class LLChatHistoryHeader: public LLPanel ...@@ -435,6 +435,10 @@ class LLChatHistoryHeader: public LLPanel
{ {
LLAvatarActions::toggleMute(getAvatarId(), LLMute::flagTextChat); LLAvatarActions::toggleMute(getAvatarId(), LLMute::flagTextChat);
} }
else if (level == "report_abuse")
{
ALAvatarActions::reportAbuse(getAvatarId());
}
else if(level == "toggle_allow_text_chat") else if(level == "toggle_allow_text_chat")
{ {
LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID); LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID);
...@@ -918,6 +922,7 @@ class LLChatHistoryHeader: public LLPanel ...@@ -918,6 +922,7 @@ class LLChatHistoryHeader: public LLPanel
menu->setItemEnabled("Pay", false); menu->setItemEnabled("Pay", false);
menu->setItemEnabled("Block Unblock", false); menu->setItemEnabled("Block Unblock", false);
menu->setItemEnabled("Mute Text", false); menu->setItemEnabled("Mute Text", false);
menu->setItemEnabled("Report", false);
} }
else else
{ {
...@@ -930,9 +935,7 @@ class LLChatHistoryHeader: public LLPanel ...@@ -930,9 +935,7 @@ class LLChatHistoryHeader: public LLPanel
menu->setItemEnabled("Request Teleport", LLAvatarActions::canOfferTeleport(mAvatarID)); menu->setItemEnabled("Request Teleport", LLAvatarActions::canOfferTeleport(mAvatarID));
menu->setItemEnabled("Voice Call", LLAvatarActions::canCall()); menu->setItemEnabled("Voice Call", LLAvatarActions::canCall());
// We should only show 'Zoom in' item in a nearby chat menu->setItemVisible("Zoom In", ALAvatarActions::canZoomIn(mAvatarID));
bool should_show_zoom = !LLIMModel::getInstance()->findIMSession(currentSessionID);
menu->setItemVisible("Zoom In", should_show_zoom && gObjectList.findObject(mAvatarID));
menu->setItemEnabled("Block Unblock", LLAvatarActions::canBlock(mAvatarID)); menu->setItemEnabled("Block Unblock", LLAvatarActions::canBlock(mAvatarID));
menu->setItemEnabled("Mute Text", LLAvatarActions::canBlock(mAvatarID)); menu->setItemEnabled("Mute Text", LLAvatarActions::canBlock(mAvatarID));
menu->setItemEnabled("Chat History", LLLogChat::isTranscriptExist(mAvatarID)); menu->setItemEnabled("Chat History", LLLogChat::isTranscriptExist(mAvatarID));
......
...@@ -184,6 +184,7 @@ void LLConversationItem::buildParticipantMenuOptions(menuentry_vec_t& items, U32 ...@@ -184,6 +184,7 @@ void LLConversationItem::buildParticipantMenuOptions(menuentry_vec_t& items, U32
items.push_back(std::string("pay")); items.push_back(std::string("pay"));
items.push_back(std::string("block_unblock")); items.push_back(std::string("block_unblock"));
items.push_back(std::string("MuteText")); items.push_back(std::string("MuteText"));
items.push_back(std::string("report_abuse"));
if ((getType() != CONV_SESSION_1_ON_1) && mDisplayModeratorOptions) if ((getType() != CONV_SESSION_1_ON_1) && mDisplayModeratorOptions)
{ {
......
...@@ -1195,6 +1195,10 @@ void LLFloaterIMContainer::doToParticipants(const std::string& command, uuid_vec ...@@ -1195,6 +1195,10 @@ void LLFloaterIMContainer::doToParticipants(const std::string& command, uuid_vec
{ {
LLAvatarActions::toggleMute(userID, LLMute::flagVoiceChat); LLAvatarActions::toggleMute(userID, LLMute::flagVoiceChat);
} }
else if ("report_abuse" == command)
{
ALAvatarActions::reportAbuse(userID);
}
else if ("mute_unmute" == command) else if ("mute_unmute" == command)
{ {
LLAvatarActions::toggleMute(userID, LLMute::flagTextChat); LLAvatarActions::toggleMute(userID, LLMute::flagTextChat);
......
...@@ -111,6 +111,12 @@ ...@@ -111,6 +111,12 @@
<on_click function="AvatarIcon.Action" parameter="mute_unmute" /> <on_click function="AvatarIcon.Action" parameter="mute_unmute" />
<on_check function="AvatarIcon.Check" parameter="is_muted" /> <on_check function="AvatarIcon.Check" parameter="is_muted" />
</menu_item_check> </menu_item_check>
<menu_item_call
label="Report"
layout="topleft"
name="Report">
<on_click function="AvatarIcon.Action" parameter="report_abuse" />
</menu_item_call>
<menu_item_separator layout="topleft" name="Moderator Options Separator"/> <menu_item_separator layout="topleft" name="Moderator Options Separator"/>
<context_menu <context_menu
label="Moderator Options" label="Moderator Options"
......
...@@ -148,6 +148,12 @@ ...@@ -148,6 +148,12 @@
<on_check function="Avatar.CheckItem" parameter="is_muted" /> <on_check function="Avatar.CheckItem" parameter="is_muted" />
<on_enable function="Avatar.EnableItem" parameter="can_block" /> <on_enable function="Avatar.EnableItem" parameter="can_block" />
</menu_item_check> </menu_item_check>
<menu_item_call
label="Report"
layout="topleft"
name="report_abuse">
<on_click function="Avatar.DoToSelected" parameter="report_abuse" />
</menu_item_call>
<menu_item_call <menu_item_call
label="Group Profile" label="Group Profile"
layout="topleft" layout="topleft"
......
...@@ -53,8 +53,8 @@ ...@@ -53,8 +53,8 @@
label="Zoom In" label="Zoom In"
layout="topleft" layout="topleft"
name="zoom_in"> name="zoom_in">
<on_click function="Avatar.DoToSelected" parameter="zoom_in" /> <on_click function="Avatar.GearDoToSelected" parameter="zoom_in" />
<on_enable function="Avatar.EnableItem" parameter="can_zoom_in" /> <on_enable function="Avatar.EnableGearItem" parameter="can_zoom_in" />
</menu_item_call> </menu_item_call>
<menu_item_call <menu_item_call
label="Map" label="Map"
...@@ -95,6 +95,12 @@ ...@@ -95,6 +95,12 @@
<on_click function="Avatar.GearDoToSelected" parameter="mute_unmute" /> <on_click function="Avatar.GearDoToSelected" parameter="mute_unmute" />
<on_enable function="Avatar.EnableGearItem" parameter="can_block" /> <on_enable function="Avatar.EnableGearItem" parameter="can_block" />
</menu_item_check> </menu_item_check>
<menu_item_call
label="Report"
layout="topleft"
name="report_abuse">
<on_click function="Avatar.GearDoToSelected" parameter="report_abuse" />
</menu_item_call>
<menu_item_separator name="separator_utils"/> <menu_item_separator name="separator_utils"/>
<context_menu <context_menu
label="Utilities" label="Utilities"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment