Reverted command message UUID to message ID
This commit is contained in:
@@ -175,7 +175,7 @@ func Init() {
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
statusMesageDelay := int64(rand.Intn(appConfig.AppConfig.GeneralOptions.CommandReplyDelay))
|
||||
log.Printf("DELAYING FOR: %v", statusMesageDelay*1000000000)
|
||||
log.Printf("Delaying client connection for: %v secconds", statusMesageDelay)
|
||||
// Delay For two seccond to allow all clients to connect
|
||||
time.Sleep(time.Duration(statusMesageDelay * 1000000000))
|
||||
|
||||
@@ -197,8 +197,6 @@ func Init() {
|
||||
}()
|
||||
|
||||
}
|
||||
// // Delay For two seccond to allow all clients to connect
|
||||
// time.Sleep(time.Duration(2000000000))
|
||||
// Wait untill all client connections are open sucessfuly
|
||||
wg.Wait()
|
||||
|
||||
@@ -208,7 +206,7 @@ func Init() {
|
||||
func SendOnlinePresenceStanza(client *xmpp.Client, jid string) error {
|
||||
|
||||
statusMesageDelay := int64(rand.Intn(appConfig.AppConfig.GeneralOptions.CommandReplyDelay))
|
||||
log.Printf("DELAYING FOR: %v", statusMesageDelay*1000000000)
|
||||
log.Printf("Delaying online stanza presence message for: %v, secconds", statusMesageDelay*1000000000)
|
||||
// Delay For two seccond to allow all clients to connect
|
||||
time.Sleep(time.Duration(statusMesageDelay * 1000000000))
|
||||
|
||||
@@ -279,11 +277,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 {
|
||||
messageIDUUID := uuid.NewV4().String()
|
||||
// messageIDUUID := uuid.NewV4().String()
|
||||
commandMessageUUID := uuid.NewV4().String()
|
||||
commandMessageResponse.Responses[0].UUID = commandMessageUUID
|
||||
commandMessageResponse.PlayerID = commandMessage.Commands[0].Params.PlayerID
|
||||
commandMessageResponse.MessageID = messageIDUUID
|
||||
commandMessageResponse.MessageID = commandMessage.MessageID
|
||||
|
||||
} else {
|
||||
log.Printf("<%v> There are no commands inside command message : %v", msg.To, commandMessage)
|
||||
|
||||
Reference in New Issue
Block a user