summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoxie Linden <roxie@lindenlab.com>2024-04-07 14:16:07 -0700
committerRoxie Linden <roxie@lindenlab.com>2024-04-07 14:16:07 -0700
commit4be63d8c1f56fb6d00f13b9a2d84f2d58e170344 (patch)
tree81dcaea179286d9201c48527f2eaa7b64bc84606
parent34ed990fa363f3df0a9817d36ef0becdcf641e80 (diff)
missed a file
-rw-r--r--indra/newview/llimview.cpp58
1 files changed, 32 insertions, 26 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index f710fea3e0..f01fde08d9 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -2727,7 +2727,7 @@ LLIncomingCallDialog::LLIncomingCallDialog(const LLSD& payload) :
void LLIncomingCallDialog::onLifetimeExpired()
{
- LLVoiceP2PIncomingCallInterfacePtr call = LLVoiceClient::getInstance()->getIncomingCallInterface(mPayload["voice_session_info"]);
+ LLVoiceP2PIncomingCallInterfacePtr call = LLVoiceClient::getInstance()->getIncomingCallInterface(mPayload["voice_channel_info"]);
if (call)
{
// restart notification's timer if call is still valid
@@ -3590,33 +3590,39 @@ void LLIMMgr::clearPendingInvitation(const LLUUID& session_id)
void LLIMMgr::processAgentListUpdates(const LLUUID& session_id, const LLSD& body)
{
- if (body.isMap() && body.has("agent_updates") && body["agent_updates"].isMap())
- {
- LLSD::map_const_iterator update_it;
- for (update_it = body["agent_updates"].beginMap(); update_it != body["agent_updates"].endMap(); ++update_it)
- {
- LLSD agent_data = update_it->second;
+ if (body.isMap() && body.has("agent_updates") && body["agent_updates"].isMap())
+ {
+ LLSD::map_const_iterator update_it;
+ for (update_it = body["agent_updates"].beginMap(); update_it != body["agent_updates"].endMap(); ++update_it)
+ {
+ LLUUID agent_id = LLUUID(update_it->first);
+ LLSD agent_data = update_it->second;
+ if (agent_data.has("transition") && agent_data["transition"].asString() == "LEAVE")
+ {
+ // ignore actual leaves as those will be handled separately.
+ continue;
+ }
- if (agent_data.isMap() && agent_data.has("info") && agent_data["info"].isMap())
- {
- // Is one of the participants leaving a P2P Chat?
- if (agent_data["info"].has("can_voice_chat") && !agent_data["info"]["can_voice_chat"].asBoolean())
- {
- LLVoiceChannelGroup *channelp = dynamic_cast < LLVoiceChannelGroup*>(LLVoiceChannel::getChannelByID(session_id));
- if (channelp && channelp->isP2P())
- {
- // it's an adhoc-style P2P channel, and voice is disabled / declined. notify the user
+ if (agent_id != gAgentID && agent_data.isMap() && agent_data.has("info") && agent_data["info"].isMap())
+ {
+ // Is one of the participants leaving a P2P Chat?
+ if (agent_data["info"].has("can_voice_chat") && !agent_data["info"]["can_voice_chat"].asBoolean())
+ {
+ LLVoiceChannelGroup *channelp = dynamic_cast < LLVoiceChannelGroup*>(LLVoiceChannel::getChannelByID(session_id));
+ if (channelp && channelp->isP2P())
+ {
+ // it's an adhoc-style P2P channel, and the peer has declined voice. notify the user
// and shut down the voice channel.
- LLSD notifyArgs = LLSD::emptyMap();
- notifyArgs["VOICE_CHANNEL_NAME"] = channelp->getSessionName();
- LLNotificationsUtil::add("P2PCallDeclined", notifyArgs);
- endCall(session_id);
- break;
- }
- }
- }
- }
- }
+ LLSD notifyArgs = LLSD::emptyMap();
+ notifyArgs["VOICE_CHANNEL_NAME"] = channelp->getSessionName();
+ LLNotificationsUtil::add("P2PCallDeclined", notifyArgs);
+ endCall(session_id);
+ break;
+ }
+ }
+ }
+ }
+ }
LLFloaterIMSession* im_floater = LLFloaterIMSession::findInstance(session_id);
if ( im_floater )