Skip to content

Commit

Permalink
Send messages as Type stanza.ChatMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
tmsmr committed Jan 5, 2020
1 parent 3f89306 commit 8bf309a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ func main() {
// create reply with identical contents
reply := MessageBody{
Message: stanza.Message{
To: msg.From.Bare(),
To: msg.From.Bare(),
Type: stanza.ChatMessage,
},
Body: msg.Body,
}
Expand All @@ -138,7 +139,8 @@ func main() {
// try to send message, ignore errors
_ = xmppSession.Encode(MessageBody{
Message: stanza.Message{
To: recipient,
To: recipient,
Type: stanza.ChatMessage,
},
Body: m,
})
Expand Down

0 comments on commit 8bf309a

Please sign in to comment.