Add rendering forms to messages, add configuring mucs, add getting muc affiliations, add a bunch of other stuff idk man check the diff
This commit is contained in:
1 parent
7a875f84a5
commit
34b885a770
19 files changed
+706
-101
No files matched your search
@@ -0,0 +1,35 @@
|
||||
package main
|
||||
|
||||
// Implementation of XEP-0045 admin
|
||||
// https://xmpp.org/extensions/xep-0045.html
|
||||
|
||||
import (
|
||||
"encoding/xml"
|
||||
"gosrc.io/xmpp/stanza"
|
||||
)
|
||||
|
||||
type MucAdminQuery struct {
|
||||
XMLName xml.Name `xml:"http://jabber.org/protocol/muc#admin query"`
|
||||
MucAdminItems []MucAdminItem `xml:"http://jabber.org/protocol/muc#admin item"`
|
||||
ResultSet *stanza.ResultSet `xml:"set,omitempty"`
|
||||
}
|
||||
|
||||
type MucAdminItem struct {
|
||||
Affiliation string `xml:"affiliation,attr,omitempty"`
|
||||
JID string `xml:"jid,attr,omitempty"`
|
||||
Nick string `xml:"nick,attr,omitempty"`
|
||||
Role string `xml:"role,attr,omitempty"`
|
||||
Reason string `xml:"reason,omitempty"`
|
||||
}
|
||||
|
||||
func (v *MucAdminQuery) Namespace() string {
|
||||
return v.XMLName.Space
|
||||
}
|
||||
|
||||
func (v *MucAdminQuery) GetSet() *stanza.ResultSet {
|
||||
return v.ResultSet
|
||||
}
|
||||
|
||||
func init() {
|
||||
stanza.TypeRegistry.MapExtension(stanza.PKTIQ, xml.Name{Space: "http://jabber.org/protocol/muc#admin", Local: "query"}, MucAdminQuery{})
|
||||
}
|
||||
Reference in new issue
Block a user