Add support for multi body in message with lang definition.
This commit is contained in:
parent
0490e0a087
commit
4df4e9cec2
|
|
@ -67,15 +67,16 @@ func (iq *Iq) Response(type_ string) *Iq {
|
||||||
|
|
||||||
// XMPP <message/> stanza.
|
// XMPP <message/> stanza.
|
||||||
type Message struct {
|
type Message struct {
|
||||||
XMLName xml.Name `xml:"message"`
|
XMLName xml.Name `xml:"message"`
|
||||||
Id string `xml:"id,attr,omitempty"`
|
Id string `xml:"id,attr,omitempty"`
|
||||||
Type string `xml:"type,attr,omitempty"`
|
Type string `xml:"type,attr,omitempty"`
|
||||||
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