summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llimview.cpp16
-rwxr-xr-xindra/newview/llviewermessage.cpp4
-rw-r--r--indra/newview/llviewermessage.h2
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml1
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml3
5 files changed, 17 insertions, 9 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 106811b7e0..2d2bd1f92e 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -64,6 +64,7 @@
#include "lltoolbarview.h"
#include "llviewercontrol.h"
#include "llviewerparcelmgr.h"
+#include "message.h"
const static std::string ADHOC_NAME_SUFFIX(" Conference");
@@ -2831,12 +2832,17 @@ void LLIMMgr::inviteToSession(
if (voice_invite)
{
- if ( // if we are rejecting group calls
- (gSavedSettings.getBOOL("VoiceCallsRejectGroup") && notify_box_type == "VoiceInviteGroup") ||
- // or we're rejecting non-friend voice calls and this isn't a friend
- (gSavedSettings.getBOOL("VoiceCallsFriendsOnly") && (LLAvatarTracker::instance().getBuddyInfo(caller_id) == NULL))
- )
+ bool isRejectGroupCall = (gSavedSettings.getBOOL("VoiceCallsRejectGroup") && (notify_box_type == "VoiceInviteGroup"));
+ bool isRejectNonFriendCall = (gSavedSettings.getBOOL("VoiceCallsFriendsOnly") && (LLAvatarTracker::instance().getBuddyInfo(caller_id) == NULL));
+ bool isRejectDoNotDisturb = gAgent.isDoNotDisturb();
+ if (isRejectGroupCall || isRejectNonFriendCall || isRejectDoNotDisturb)
{
+ if (isRejectDoNotDisturb && !isRejectGroupCall && !isRejectNonFriendCall)
+ {
+ LLSD args;
+ addSystemMessage(session_id, "you_auto_rejected_call", args);
+ send_do_not_disturb_message(gMessageSystem, caller_id, session_id);
+ }
// silently decline the call
LLIncomingCallDialog::processCallResponse(1, payload);
return;
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 56c9f81259..e21db146db 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -179,8 +179,6 @@ const BOOL SCRIPT_QUESTION_IS_CAUTION[SCRIPT_PERMISSION_EOF] =
FALSE // TeleportYourAgent
};
-static void send_do_not_disturb_message (LLMessageSystem* msg, const LLUUID& from_id, const LLUUID& session_id = LLUUID::null);
-
bool friendship_offer_callback(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
@@ -3240,7 +3238,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
}
}
-static void send_do_not_disturb_message (LLMessageSystem* msg, const LLUUID& from_id, const LLUUID& session_id)
+void send_do_not_disturb_message (LLMessageSystem* msg, const LLUUID& from_id, const LLUUID& session_id)
{
if (gAgent.isDoNotDisturb())
{
diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h
index b298f0060b..447fdeb9c7 100644
--- a/indra/newview/llviewermessage.h
+++ b/indra/newview/llviewermessage.h
@@ -152,6 +152,8 @@ void send_group_notice(const LLUUID& group_id,
const std::string& message,
const LLInventoryItem* item);
+void send_do_not_disturb_message (LLMessageSystem* msg, const LLUUID& from_id, const LLUUID& session_id = LLUUID::null);
+
void handle_lure(const LLUUID& invitee);
void handle_lure(const uuid_vec_t& ids);
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index bf2bfaf386..94307d2f93 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -3695,6 +3695,7 @@ Do Not Disturb is on. You will not be notified of incoming communications.
- Other residents will receive your Do Not Disturb response (set in Preferences > General).
- Teleportation offers will be declined.
+- Voice calls will be rejected.
- Inventory offers will go to your Trash.
<usetemplate
ignoretext="I change my status to Do Not Disturb mode"
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 8489e8ca0f..18b914c764 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -3384,7 +3384,8 @@ If you continue to receive this message, contact the [SUPPORT_SITE].
<string name="answered_call">Your call has been answered</string>
<string name="you_started_call">You started a voice call</string>
<string name="you_joined_call">You joined the voice call</string>
- <string name="name_started_call">[NAME] started a voice call</string>
+ <string name="you_auto_rejected_call-im">You automatically rejected the voice call while &apos;Do Not Disturb&apos; was on.</string>
+ <string name="name_started_call">[NAME] started a voice call</string>
<string name="ringing-im">
Joining voice call...