some qol stuff
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package main
|
||||
|
||||
// Implementation of XEP-0199: XMPP Ping
|
||||
// https://xmpp.org/extensions/xep-0199.html
|
||||
|
||||
import (
|
||||
"encoding/xml"
|
||||
"gosrc.io/xmpp/stanza"
|
||||
)
|
||||
|
||||
type Ping struct {
|
||||
stanza.IQ
|
||||
XMLName xml.Name `xml:"urn:xmpp:ping ping"`
|
||||
ResultSet *stanza.ResultSet `xml:"set,omitempty"`
|
||||
}
|
||||
|
||||
func (v *Ping) Namespace() string {
|
||||
return v.XMLName.Space
|
||||
}
|
||||
|
||||
func (v *Ping) GetSet() *stanza.ResultSet {
|
||||
return v.ResultSet
|
||||
}
|
||||
|
||||
func init() {
|
||||
stanza.TypeRegistry.MapExtension(stanza.PKTIQ, xml.Name{Space: "urn:xmpp:ping", Local: "ping"}, Ping{})
|
||||
}
|
||||
Reference in New Issue
Block a user