Fix naming and typos

This commit is contained in:
Senad Uka
2021-09-20 13:30:35 +02:00
parent c6102ec199
commit 58f003ec99
7 changed files with 13 additions and 19 deletions

View File

@@ -194,10 +194,10 @@ func handleMessage(s xmpp.Sender, p stanza.Packet) {
}
log.Printf("<%v> received following message: %v", msg.To, msg.Body)
statusMesageDelay := int64(rand.Intn(appConfig.AppConfig.GeneralOptions.StatusMessageDelay))
log.Printf("DELAYING FOR: %v", statusMesageDelay*1000000000)
commandReplyDelay := int64(rand.Intn(appConfig.AppConfig.GeneralOptions.CommandReplyDelay))
log.Printf("Waiting FOR: %v", commandReplyDelay*1000000000)
// Delay For two seccond to allow all clients to connect
time.Sleep(time.Duration(statusMesageDelay * 1000000000))
time.Sleep(time.Duration(commandReplyDelay * 1000000000))
reply := stanza.Message{Attrs: stanza.Attrs{To: msg.From}, Body: `{"status": "OK"}`}
err := s.Send(reply)