Add support of Remote Roster Manager (XEP-0321).
This commit is contained in:
parent
7d5b58fc8d
commit
0490e0a087
|
|
@ -0,0 +1,21 @@
|
||||||
|
package xmpp
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/xml"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
NSRemoteRosterManager = "urn:xmpp:tmp:roster-management:0"
|
||||||
|
|
||||||
|
RemoteRosterManagerTypeRequest = "request"
|
||||||
|
RemoteRosterManagerTypeAllowed = "allowed"
|
||||||
|
RemoteRosterManagerTypeRejected = "rejected"
|
||||||
|
)
|
||||||
|
|
||||||
|
// XEP-0321: Remote Roster Manager
|
||||||
|
|
||||||
|
type RemoteRosterManagerQuery struct {
|
||||||
|
XMLName xml.Name `xml:"urn:xmpp:tmp:roster-management:0 query"`
|
||||||
|
Reason string `xml:"reason,attr,omitempty"`
|
||||||
|
Type string `xml:"type,attr"`
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
package xmpp
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/xml"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
NSRoster = "jabber:iq:roster"
|
||||||
|
|
||||||
|
RosterSubscriptionBoth = "both"
|
||||||
|
RosterSubscriptionFrom = "from"
|
||||||
|
RosterSubscriptionTo = "to"
|
||||||
|
RosterSubscriptionRemove = "remove"
|
||||||
|
)
|
||||||
|
|
||||||
|
type RosterQuery struct {
|
||||||
|
XMLName xml.Name `xml:"jabber:iq:roster query"`
|
||||||
|
Items []RosterItem `xml:"item"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type RosterItem struct {
|
||||||
|
JID string `xml:"jid,attr"`
|
||||||
|
Name string `xml:"name,attr,omitempty"`
|
||||||
|
Subscription string `xml:"subscription,attr"`
|
||||||
|
Groupes []string `xml:"group"`
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue