forked from chteufleur/go-xmpp
Add support for multi body in message with lang definition.
This commit is contained in:
parent
0490e0a087
commit
4df4e9cec2
|
|
@ -73,9 +73,10 @@ type Message struct {
|
||||||
To string `xml:"to,attr,omitempty"`
|
To string `xml:"to,attr,omitempty"`
|
||||||
From string `xml:"from,attr,omitempty"`
|
From string `xml:"from,attr,omitempty"`
|
||||||
Subject string `xml:"subject,omitempty"`
|
Subject string `xml:"subject,omitempty"`
|
||||||
Body string `xml:"body,omitempty"`
|
Body []MessageBody `xml:"body,omitempty"`
|
||||||
Thread string `xml:"thread,omitempty"`
|
Thread string `xml:"thread,omitempty"`
|
||||||
Error *Error `xml:"error"`
|
Error *Error `xml:"error"`
|
||||||
|
Lang string `xml:"xml:lang,attr,omitempty"`
|
||||||
|
|
||||||
Confir *Confirm `xml:"confirm"` // XEP-0070
|
Confir *Confirm `xml:"confirm"` // XEP-0070
|
||||||
|
|
||||||
|
|
@ -86,6 +87,11 @@ type Message struct {
|
||||||
Gone *Gone `xml:"gone"` // XEP-0085
|
Gone *Gone `xml:"gone"` // XEP-0085
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type MessageBody struct {
|
||||||
|
Lang string `xml:"xml:lang,attr,omitempty"`
|
||||||
|
Value string `xml:",innerxml"`
|
||||||
|
}
|
||||||
|
|
||||||
// XMPP <presence/> stanza.
|
// XMPP <presence/> stanza.
|
||||||
type Presence struct {
|
type Presence struct {
|
||||||
XMLName xml.Name `xml:"presence"`
|
XMLName xml.Name `xml:"presence"`
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue