Skip to content

Commit 574e004

Browse files
manually set call status
1 parent 5de85bd commit 574e004

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

Explorer/Assets/DCL/VoiceChat/CommunityVoiceChat/CommunityVoiceChatCallStatusService.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,14 @@ private async UniTaskVoid StartCallAsync(string communityId, CancellationToken c
7878
connectionUrl = result.Value.Ok.Credentials.ConnectionUrl;
7979
SetCallId(communityId);
8080
UpdateStatus(VoiceChatStatus.VOICE_CHAT_IN_CALL);
81+
82+
// The backend does not echo the CommunityVoiceChatStarted websocket update
83+
// back to the originator (mirrored by the asymmetric handling in EndStreamInCurrentCall),
84+
// so flip the per-community reactive flag locally for any UI that subscribes to it.
85+
if (communityVoiceChatCalls.TryGetValue(communityId, out ReactiveProperty<bool>? existingStartData))
86+
existingStartData.UpdateValue(true);
87+
else
88+
communityVoiceChatCalls[communityId] = new ReactiveProperty<bool>(true);
8189
break;
8290
case StartCommunityVoiceChatResponse.ResponseOneofCase.InvalidRequest:
8391
case StartCommunityVoiceChatResponse.ResponseOneofCase.ConflictingError:

0 commit comments

Comments
 (0)