From 2ad058aa38485ffc48910b3bfe9679bdd9d692b3 Mon Sep 17 00:00:00 2001 From: Roxie Linden Date: Fri, 22 Sep 2023 12:40:16 -0700 Subject: join notification was going out before session was created. --- indra/newview/llvoicewebrtc.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index 3942f4171d..3073a58183 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -1121,6 +1121,13 @@ bool LLWebRTCVoiceClient::addAndJoinSession(const sessionStatePtr_t &nextSession // add 'self' participant. addParticipantByID(gAgent.getID()); + // tell peers that this participant has joined. + + Json::FastWriter writer; + Json::Value root; + root["j"] = true; + std::string json_data = writer.write(root); + mWebRTCDataInterface->sendData(json_data, false); notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_JOINED); @@ -2681,12 +2688,7 @@ void LLWebRTCVoiceClient::OnDataReceived(const std::string& data, bool binary) void LLWebRTCVoiceClient::OnDataChannelReady() { - // send a join - Json::FastWriter writer; - Json::Value root; - root["j"] = true; - std::string json_data = writer.write(root); - mWebRTCDataInterface->sendData(json_data, false); + } -- cgit v1.2.3