Origin dest and cmdID added to msg to send voice and mobile queue

master
Alex 2022-03-15 21:43:39 +01:00
parent 1bff2cb88c
commit 51dd260e1b
1 changed files with 3 additions and 3 deletions

View File

@ -171,10 +171,10 @@ func HandleMinecraftMessage(conn *websocket.Conn, msg []byte) {
raw = kraProtocol.EncodeWebMessage(kraProtocol.StatusGet, webCmdID, cmdNumber, args) raw = kraProtocol.EncodeWebMessage(kraProtocol.StatusGet, webCmdID, cmdNumber, args)
if dest == kraProtocol.DestVoice { // TODO: correct dest if dest == kraProtocol.DestVoice {
webClient.SendVoiceQueueMessages = append(webClient.SendVoiceQueueMessages, &structs.SendQueueMessage{MessageRaw: raw, CmdID: webCmdID, TrySendCount: 0, OriginDest: 111111, OriginCmdID: cmdID, Time: time.Now()}) webClient.SendVoiceQueueMessages = append(webClient.SendVoiceQueueMessages, &structs.SendQueueMessage{MessageRaw: raw, CmdID: webCmdID, TrySendCount: 0, OriginDest: mcClient.Dest, OriginCmdID: cmdID, Time: time.Now()})
} else { } 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 { } else {
raw = kraProtocol.EncodeWebMessage(kraProtocol.StatusSend, 0, cmdNumber, args) raw = kraProtocol.EncodeWebMessage(kraProtocol.StatusSend, 0, cmdNumber, args)