From 51dd260e1b9a224e0ee5294626d346a1b22d8b7a Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 15 Mar 2022 21:43:39 +0100 Subject: [PATCH] Origin dest and cmdID added to msg to send voice and mobile queue --- serverCommunication/minecraft.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/serverCommunication/minecraft.go b/serverCommunication/minecraft.go index 0169144..fe54705 100644 --- a/serverCommunication/minecraft.go +++ b/serverCommunication/minecraft.go @@ -171,10 +171,10 @@ func HandleMinecraftMessage(conn *websocket.Conn, msg []byte) { raw = kraProtocol.EncodeWebMessage(kraProtocol.StatusGet, webCmdID, cmdNumber, args) - if dest == kraProtocol.DestVoice { // TODO: correct dest - webClient.SendVoiceQueueMessages = append(webClient.SendVoiceQueueMessages, &structs.SendQueueMessage{MessageRaw: raw, CmdID: webCmdID, TrySendCount: 0, OriginDest: 111111, OriginCmdID: cmdID, Time: time.Now()}) + if dest == kraProtocol.DestVoice { + webClient.SendVoiceQueueMessages = append(webClient.SendVoiceQueueMessages, &structs.SendQueueMessage{MessageRaw: raw, CmdID: webCmdID, TrySendCount: 0, OriginDest: mcClient.Dest, OriginCmdID: cmdID, Time: time.Now()}) } else { - webClient.SendMobileQueueMessages = append(webClient.SendMobileQueueMessages, &structs.SendQueueMessage{MessageRaw: raw, CmdID: webCmdID, TrySendCount: 0, Time: time.Now()}) + webClient.SendMobileQueueMessages = append(webClient.SendMobileQueueMessages, &structs.SendQueueMessage{MessageRaw: raw, CmdID: webCmdID, TrySendCount: 0, OriginDest: mcClient.Dest, OriginCmdID: cmdID, Time: time.Now()}) } } else { raw = kraProtocol.EncodeWebMessage(kraProtocol.StatusSend, 0, cmdNumber, args)