SL-12871 'Only Friends and Groups can call or IM me' setting should be account based.
parent
9df7f5728b
commit
6c41ea62ce
|
|
@ -14247,7 +14247,7 @@
|
|||
<key>VoiceCallsFriendsOnly</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Only accept voice calls from residents on your friends list</string>
|
||||
<string>(Deprecated) Only accept voice calls from residents on your friends list</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
|
|
|
|||
|
|
@ -220,6 +220,17 @@
|
|||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>VoiceCallsFriendsOnly</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Only accept voice calls and receive IMs from residents on your friends list</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>VoiceEffectDefault</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
|
|||
|
|
@ -1760,6 +1760,8 @@ void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im
|
|||
getChildView("log_path_button")->setEnabled(TRUE);
|
||||
getChildView("chat_font_size")->setEnabled(TRUE);
|
||||
getChildView("conversation_log_combo")->setEnabled(TRUE);
|
||||
getChild<LLUICtrl>("voice_call_friends_only_check")->setEnabled(TRUE);
|
||||
getChild<LLUICtrl>("voice_call_friends_only_check")->setValue(gSavedPerAccountSettings.getBOOL("VoiceCallsFriendsOnly"));
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -2360,9 +2362,13 @@ void LLPanelPreference::showMultipleViewersWarning(LLUICtrl* checkbox, const LLS
|
|||
|
||||
void LLPanelPreference::showFriendsOnlyWarning(LLUICtrl* checkbox, const LLSD& value)
|
||||
{
|
||||
if (checkbox && checkbox->getValue())
|
||||
if (checkbox)
|
||||
{
|
||||
LLNotificationsUtil::add("FriendsAndGroupsOnly");
|
||||
gSavedPerAccountSettings.setBOOL("VoiceCallsFriendsOnly", checkbox->getValue().asBoolean());
|
||||
if (checkbox->getValue())
|
||||
{
|
||||
LLNotificationsUtil::add("FriendsAndGroupsOnly");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2468,7 +2474,6 @@ class LLPanelPreferencePrivacy : public LLPanelPreference
|
|||
public:
|
||||
LLPanelPreferencePrivacy()
|
||||
{
|
||||
mAccountIndependentSettings.push_back("VoiceCallsFriendsOnly");
|
||||
mAccountIndependentSettings.push_back("AutoDisengageMic");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -450,7 +450,7 @@ void LLIMProcessing::processNewMessage(LLUUID from_id,
|
|||
|| (dialog == IM_FROM_TASK && LLMuteList::getInstance()->isMuted(session_id));
|
||||
BOOL is_owned_by_me = FALSE;
|
||||
BOOL is_friend = (LLAvatarTracker::instance().getBuddyInfo(from_id) == NULL) ? false : true;
|
||||
BOOL accept_im_from_only_friend = gSavedSettings.getBOOL("VoiceCallsFriendsOnly");
|
||||
BOOL accept_im_from_only_friend = gSavedPerAccountSettings.getBOOL("VoiceCallsFriendsOnly");
|
||||
BOOL is_linden = chat.mSourceType != CHAT_SOURCE_OBJECT &&
|
||||
LLMuteList::getInstance()->isLinden(name);
|
||||
|
||||
|
|
@ -1164,7 +1164,7 @@ void LLIMProcessing::processNewMessage(LLUUID from_id,
|
|||
{
|
||||
return;
|
||||
}
|
||||
else if (gSavedSettings.getBOOL("VoiceCallsFriendsOnly") && (LLAvatarTracker::instance().getBuddyInfo(from_id) == NULL))
|
||||
else if (gSavedPerAccountSettings.getBOOL("VoiceCallsFriendsOnly") && (LLAvatarTracker::instance().getBuddyInfo(from_id) == NULL))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2684,7 +2684,7 @@ void LLIMMgr::addMessage(
|
|||
}
|
||||
bool skip_message = false;
|
||||
bool from_linden = LLMuteList::getInstance()->isLinden(from);
|
||||
if (gSavedSettings.getBOOL("VoiceCallsFriendsOnly") && !from_linden)
|
||||
if (gSavedPerAccountSettings.getBOOL("VoiceCallsFriendsOnly") && !from_linden)
|
||||
{
|
||||
// Evaluate if we need to skip this message when that setting is true (default is false)
|
||||
skip_message = (LLAvatarTracker::instance().getBuddyInfo(other_participant_id) == NULL); // Skip non friends...
|
||||
|
|
@ -3073,7 +3073,7 @@ void LLIMMgr::inviteToSession(
|
|||
if (voice_invite)
|
||||
{
|
||||
bool isRejectGroupCall = (gSavedSettings.getBOOL("VoiceCallsRejectGroup") && (notify_box_type == "VoiceInviteGroup"));
|
||||
bool isRejectNonFriendCall = (gSavedSettings.getBOOL("VoiceCallsFriendsOnly") && (LLAvatarTracker::instance().getBuddyInfo(caller_id) == NULL));
|
||||
bool isRejectNonFriendCall = (gSavedPerAccountSettings.getBOOL("VoiceCallsFriendsOnly") && (LLAvatarTracker::instance().getBuddyInfo(caller_id) == NULL));
|
||||
if (isRejectGroupCall || isRejectNonFriendCall || gAgent.isDoNotDisturb())
|
||||
{
|
||||
if (gAgent.isDoNotDisturb() && !isRejectGroupCall && !isRejectNonFriendCall)
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@
|
|||
</check_box>
|
||||
|
||||
<check_box
|
||||
control_name="VoiceCallsFriendsOnly"
|
||||
enabled="false"
|
||||
height="16"
|
||||
label="Only friends and groups can call or IM me"
|
||||
layout="topleft"
|
||||
|
|
|
|||
Loading…
Reference in New Issue