mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2024-11-22 02:22:00 -08:00
feat!: change msg subject and body to localizable structs
This commit is contained in:
parent
c1309102bc
commit
1f2f2bb1c5
@ -8,13 +8,29 @@ import (
|
|||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Message Packet
|
// Message Packet
|
||||||
|
|
||||||
|
// Subject is an element of a message
|
||||||
|
type Subject struct {
|
||||||
|
XMLName xml.Name `xml:"subject"`
|
||||||
|
|
||||||
|
Content string `xml:",chardata,omitempty"`
|
||||||
|
Lang string `xml:"lang,attr,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Body is an element of a message
|
||||||
|
type Body struct {
|
||||||
|
XMLName xml.Name `xml:"body"`
|
||||||
|
|
||||||
|
Content string `xml:",chardata,omitempty"`
|
||||||
|
Lang string `xml:"lang,attr,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
// Message implements RFC 6120 - A.5 Client Namespace (a part)
|
// Message implements RFC 6120 - A.5 Client Namespace (a part)
|
||||||
type Message struct {
|
type Message struct {
|
||||||
XMLName xml.Name `xml:"message"`
|
XMLName xml.Name `xml:"message"`
|
||||||
Attrs
|
Attrs
|
||||||
|
|
||||||
Subject string `xml:"subject,omitempty"`
|
Subject []Subject `xml:"subject,omitempty"`
|
||||||
Body string `xml:"body,omitempty"`
|
Body []Body `xml:"body,omitempty"`
|
||||||
Thread string `xml:"thread,omitempty"`
|
Thread string `xml:"thread,omitempty"`
|
||||||
Error Err `xml:"error,omitempty"`
|
Error Err `xml:"error,omitempty"`
|
||||||
Extensions []MsgExtension `xml:",omitempty"`
|
Extensions []MsgExtension `xml:",omitempty"`
|
||||||
|
Loading…
Reference in New Issue
Block a user