음성채팅에 mid 대신 alias로 로그인
This commit is contained in:
@ -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)
|
voiceendpoint := fmt.Sprintf("https://api.epicgames.dev/rtc/v1/%s/room/%s", config.EosDeploymentId, data.Gid)
|
||||||
participants := eosRoomParticipants{
|
participants := eosRoomParticipants{
|
||||||
Participants: []eosRoomParticipantRequests{
|
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)
|
participant := par.(map[string]any)
|
||||||
|
|
||||||
channelCredentials := map[string]any{
|
channelCredentials := map[string]any{
|
||||||
"override_userid": data.Mid,
|
"override_userid": data.Alias,
|
||||||
"client_base_url": result["clientBaseUrl"],
|
"client_base_url": result["clientBaseUrl"],
|
||||||
"participant_token": participant["token"],
|
"participant_token": participant["token"],
|
||||||
}
|
}
|
||||||
@ -125,7 +125,7 @@ func (gv *eosauth) joinVoiceChat(data JoinVoiceChatRequst) map[string]any {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (gv *eosauth) leaveVoiceChat(data LeaveVoiceChatRequst) {
|
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
|
accessToken := gv.AccessToken
|
||||||
|
|
||||||
req, _ := http.NewRequest("DELETE", voiceendpoint, nil)
|
req, _ := http.NewRequest("DELETE", voiceendpoint, nil)
|
||||||
|
|||||||
@ -11,14 +11,13 @@ import (
|
|||||||
|
|
||||||
type JoinVoiceChatRequst struct {
|
type JoinVoiceChatRequst struct {
|
||||||
Gid string
|
Gid string
|
||||||
Mid string
|
|
||||||
Service string
|
|
||||||
Alias string
|
Alias string
|
||||||
|
Service string
|
||||||
}
|
}
|
||||||
|
|
||||||
type LeaveVoiceChatRequst struct {
|
type LeaveVoiceChatRequst struct {
|
||||||
Gid string
|
Gid string
|
||||||
Mid string
|
Alias string
|
||||||
Service string
|
Service string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user