kopia lustrzana https://github.com/tmsmr/xmpp-webhook
Send messages as Type stanza.ChatMessage
rodzic
3f89306909
commit
8bf309a189
6
main.go
6
main.go
|
@ -114,7 +114,8 @@ func main() {
|
||||||
// create reply with identical contents
|
// create reply with identical contents
|
||||||
reply := MessageBody{
|
reply := MessageBody{
|
||||||
Message: stanza.Message{
|
Message: stanza.Message{
|
||||||
To: msg.From.Bare(),
|
To: msg.From.Bare(),
|
||||||
|
Type: stanza.ChatMessage,
|
||||||
},
|
},
|
||||||
Body: msg.Body,
|
Body: msg.Body,
|
||||||
}
|
}
|
||||||
|
@ -138,7 +139,8 @@ func main() {
|
||||||
// try to send message, ignore errors
|
// try to send message, ignore errors
|
||||||
_ = xmppSession.Encode(MessageBody{
|
_ = xmppSession.Encode(MessageBody{
|
||||||
Message: stanza.Message{
|
Message: stanza.Message{
|
||||||
To: recipient,
|
To: recipient,
|
||||||
|
Type: stanza.ChatMessage,
|
||||||
},
|
},
|
||||||
Body: m,
|
Body: m,
|
||||||
})
|
})
|
||||||
|
|
Ładowanie…
Reference in New Issue