Add support for Out of Band markers (OOB) from XEP-0066

This commit is contained in:
Mickael Remond 2019-06-04 18:35:56 +02:00 committed by Mickaël Rémond
parent 67eaed98b6
commit 57ed387f4f

19
msg_oob.go Normal file
View file

@ -0,0 +1,19 @@
package xmpp // import "gosrc.io/xmpp"
import "encoding/xml"
/*
Support for:
- XEP-0066 - Out of Band Data: https://xmpp.org/extensions/xep-0066.html
*/
type OOB struct {
MsgExtension
XMLName xml.Name `xml:"jabber:x:oob x"`
URL string `xml:"url"`
Desc string `xml:"desc,omitempty"`
}
func init() {
typeRegistry.MapExtension(PKTMessage, xml.Name{"jabber:x:oob", "x"}, OOB{})
}