Added uuid to message_id, and uiid params in command message reply
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/twinj/uuid"
|
||||
appConfig "github.com/xmpploadtesting/config"
|
||||
"gosrc.io/xmpp"
|
||||
"gosrc.io/xmpp/stanza"
|
||||
@@ -278,9 +279,11 @@ func handleMessage(s xmpp.Sender, p stanza.Packet) {
|
||||
log.Printf("<%v> unable to unmarshal Command Meassage: %v", msg.To, msg.Body)
|
||||
}
|
||||
if len(commandMessageResponse.Responses) > 0 || len(commandMessage.Commands) > 0 {
|
||||
commandMessageResponse.Responses[0].UUID = commandMessage.Commands[0].UUID
|
||||
messageIDUUID := uuid.NewV4().String()
|
||||
commandMessageUUID := uuid.NewV4().String()
|
||||
commandMessageResponse.Responses[0].UUID = commandMessageUUID
|
||||
commandMessageResponse.PlayerID = commandMessage.Commands[0].Params.PlayerID
|
||||
commandMessageResponse.MessageID = commandMessage.MessageID
|
||||
commandMessageResponse.MessageID = messageIDUUID
|
||||
|
||||
} else {
|
||||
log.Printf("<%v> There are no commands inside command message : %v", msg.To, commandMessage)
|
||||
Reference in New Issue
Block a user