2019-06-23 10:15:47 +00:00
|
|
|
package xmpp
|
|
|
|
|
|
|
|
import (
|
|
|
|
"encoding/xml"
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
|
|
|
// ============================================================================
|
|
|
|
// MUC Presence extension
|
|
|
|
|
|
|
|
// MucPresence implements XEP-0045: Multi-User Chat - 19.1
|
|
|
|
type MucPresence struct {
|
|
|
|
PresExtension
|
|
|
|
XMLName xml.Name `xml:"http://jabber.org/protocol/muc x"`
|
|
|
|
Password string `xml:"password,omitempty"`
|
|
|
|
History History `xml:"history,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// History implements XEP-0045: Multi-User Chat - 19.1
|
|
|
|
type History struct {
|
2019-06-24 14:38:22 +00:00
|
|
|
MaxChars *int `xml:"maxchars,attr,omitempty"`
|
|
|
|
MaxStanzas *int `xml:"maxstanzas,attr,omitempty"`
|
|
|
|
Seconds *int `xml:"seconds,attr,omitempty"`
|
|
|
|
Since *time.Time `xml:"since,attr,omitempty"`
|
2019-06-23 10:15:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
TypeRegistry.MapExtension(PKTPresence, xml.Name{"http://jabber.org/protocol/muc", "x"}, MucPresence{})
|
|
|
|
}
|