summaryrefslogtreecommitdiff
path: root/indra/newview/llimview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llimview.cpp')
-rw-r--r--indra/newview/llimview.cpp37
1 files changed, 15 insertions, 22 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index e2e3524f74..8c33c94bbe 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -248,7 +248,8 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES
switch(mSessionType)
{
case AVALINE_SESSION:
- // *TODO: test avaline calls (EXT-2211)
+ // no text notifications
+ break;
case P2P_SESSION:
gCacheName->getFullName(mOtherParticipantID, other_avatar_name);
@@ -283,28 +284,14 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES
break;
}
}
-
- // Update speakers list when connected
- if (LLVoiceChannel::STATE_CONNECTED == new_state)
- {
- mSpeakers->update(true);
- }
-
break;
case GROUP_SESSION:
case ADHOC_SESSION:
- // *TODO: determine call starter's name "other_avatar_name" (EXT-2211)
- // decide how to show notifications for a group/adhoc chat already opened
- // for now there is no notification from voice channel for this case
if(direction == LLVoiceChannel::INCOMING_CALL)
{
switch(new_state)
{
- case LLVoiceChannel::STATE_CALL_STARTED :
- message = other_avatar_name + " " + started_call;
- LLIMModel::getInstance()->addMessageSilently(mSessionID, SYSTEM_FROM, LLUUID::null, message);
- break;
case LLVoiceChannel::STATE_CONNECTED :
message = you + " " + joined_call;
LLIMModel::getInstance()->addMessageSilently(mSessionID, SYSTEM_FROM, LLUUID::null, message);
@@ -324,13 +311,11 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES
break;
}
}
-
- // Update speakers list when connected
- if (LLVoiceChannel::STATE_CONNECTED == new_state)
- {
- mSpeakers->update(true);
- }
- break;
+ }
+ // Update speakers list when connected
+ if (LLVoiceChannel::STATE_CONNECTED == new_state)
+ {
+ mSpeakers->update(true);
}
}
@@ -1878,6 +1863,14 @@ void LLIncomingCallDialog::processCallResponse(S32 response)
new LLViewerChatterBoxInvitationAcceptResponder(
session_id,
inv_type));
+
+ // send notification message to the corresponding chat
+ if (mPayload["notify_box_type"].asString() == "VoiceInviteGroup" || mPayload["notify_box_type"].asString() == "VoiceInviteAdHoc")
+ {
+ std::string started_call = LLTrans::getString("started_call");
+ std::string message = mPayload["caller_name"].asString() + " " + started_call;
+ LLIMModel::getInstance()->addMessageSilently(session_id, SYSTEM_FROM, LLUUID::null, message);
+ }
}
}
if (voice)