mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2024-11-24 11:32:00 -08:00
Merge pull request #1 from ianlamb/master
feat!: change msg subject and body to localizable structs
This commit is contained in:
commit
3243555edb
@ -8,16 +8,21 @@ import (
|
|||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Message Packet
|
// Message Packet
|
||||||
|
|
||||||
|
type LocalizedString struct {
|
||||||
|
Content string `xml:",chardata"`
|
||||||
|
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 []LocalizedString `xml:"subject,omitempty"`
|
||||||
Body string `xml:"body,omitempty"`
|
Body []LocalizedString `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"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (Message) Name() string {
|
func (Message) Name() string {
|
||||||
|
Loading…
Reference in New Issue
Block a user