diff --git a/voicechat/eos_impl.go b/voicechat/eos_impl.go index d05370c..9f51fdf 100644 --- a/voicechat/eos_impl.go +++ b/voicechat/eos_impl.go @@ -88,7 +88,7 @@ func (gv *eosauth) joinVoiceChat(data JoinVoiceChatRequst) map[string]any { voiceendpoint := fmt.Sprintf("https://api.epicgames.dev/rtc/v1/%s/room/%s", config.EosDeploymentId, data.Gid) participants := eosRoomParticipants{ Participants: []eosRoomParticipantRequests{ - {Puid: data.Mid}, + {Puid: data.Alias}, }, } @@ -114,7 +114,7 @@ func (gv *eosauth) joinVoiceChat(data JoinVoiceChatRequst) map[string]any { participant := par.(map[string]any) channelCredentials := map[string]any{ - "override_userid": data.Mid, + "override_userid": data.Alias, "client_base_url": result["clientBaseUrl"], "participant_token": participant["token"], } @@ -125,7 +125,7 @@ func (gv *eosauth) joinVoiceChat(data JoinVoiceChatRequst) map[string]any { } func (gv *eosauth) leaveVoiceChat(data LeaveVoiceChatRequst) { - voiceendpoint := fmt.Sprintf("https://api.epicgames.dev/rtc/v1/%s/room/%s/participants/%s", config.EosDeploymentId, data.Gid, data.Mid) + voiceendpoint := fmt.Sprintf("https://api.epicgames.dev/rtc/v1/%s/room/%s/participants/%s", config.EosDeploymentId, data.Gid, data.Alias) accessToken := gv.AccessToken req, _ := http.NewRequest("DELETE", voiceendpoint, nil) diff --git a/voicechat/voice_chat.go b/voicechat/voice_chat.go index 94abd0f..f449691 100644 --- a/voicechat/voice_chat.go +++ b/voicechat/voice_chat.go @@ -11,14 +11,13 @@ import ( type JoinVoiceChatRequst struct { Gid string - Mid string - Service string Alias string + Service string } type LeaveVoiceChatRequst struct { Gid string - Mid string + Alias string Service string }