Respond with status OK on every command message
This commit is contained in:
@@ -124,8 +124,9 @@ func handleMessage(s xmpp.Sender, p stanza.Packet) {
|
||||
return
|
||||
}
|
||||
|
||||
log.Printf("Received The message %v", msg)
|
||||
_, _ = fmt.Fprintf(os.Stdout, "Body = %s - from = %s\n", msg.Body, msg.From)
|
||||
reply := stanza.Message{Attrs: stanza.Attrs{To: msg.From}, Body: msg.Body}
|
||||
reply := stanza.Message{Attrs: stanza.Attrs{To: msg.From}, Body: `{"status": "OK"}`}
|
||||
err := s.Send(reply)
|
||||
log.Printf("Error sending message %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user