diff options
author | Roxie Linden <roxie@lindenlab.com> | 2024-04-06 21:58:17 -0700 |
---|---|---|
committer | Roxie Linden <roxie@lindenlab.com> | 2024-04-06 21:58:17 -0700 |
commit | 4ecf050439da2d16028ce3018a66424b0434005c (patch) | |
tree | ca6f8b5a88040718b9c412884fb8e114b4d7126e /indra | |
parent | b6f4cec7d5f771df3ed5e8f0b241b2212a6e9ffa (diff) |
Tell the user the peer has declined and shut down voice channel
When the server sends up a notification that a peer is not doing
voice in adhoc-style p2p chat, shut down the voice call and
notify the user the peer has declined.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llimview.cpp | 10 | ||||
-rw-r--r-- | indra/newview/llvoicewebrtc.cpp | 2 |
2 files changed, 9 insertions, 3 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index ff90d75ad2..f710fea3e0 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -3595,17 +3595,21 @@ void LLIMMgr::processAgentListUpdates(const LLUUID& session_id, const LLSD& body LLSD::map_const_iterator update_it; for (update_it = body["agent_updates"].beginMap(); update_it != body["agent_updates"].endMap(); ++update_it) { - LLUUID agent_id(update_it->first); LLSD agent_data = update_it->second; - if (agent_data.isMap()) + if (agent_data.isMap() && agent_data.has("info") && agent_data["info"].isMap()) { // Is one of the participants leaving a P2P Chat? - if (agent_data.has("transition") && agent_data["transition"].asString() == "LEAVE") + 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 + // and shut down the voice channel. + LLSD notifyArgs = LLSD::emptyMap(); + notifyArgs["VOICE_CHANNEL_NAME"] = channelp->getSessionName(); + LLNotificationsUtil::add("P2PCallDeclined", notifyArgs); endCall(session_id); break; } diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index dbfc28c44f..cb01a079cc 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -2368,12 +2368,14 @@ void LLVoiceWebRTCConnection::breakVoiceConnectionCoro() if (!regionp || !regionp->capabilitiesReceived()) { LL_DEBUGS("Voice") << "no capabilities for voice provisioning; waiting " << LL_ENDL; + setVoiceConnectionState(VOICE_STATE_SESSION_RETRY); return; } std::string url = regionp->getCapability("ProvisionVoiceAccountRequest"); if (url.empty()) { + setVoiceConnectionState(VOICE_STATE_SESSION_RETRY); return; } |