From 57ed387f4fc5baa2a65ae98109d56267cb746ce6 Mon Sep 17 00:00:00 2001 From: Mickael Remond Date: Tue, 4 Jun 2019 18:35:56 +0200 Subject: [PATCH] Add support for Out of Band markers (OOB) from XEP-0066 --- msg_oob.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 msg_oob.go diff --git a/msg_oob.go b/msg_oob.go new file mode 100644 index 0000000..4b2188e --- /dev/null +++ b/msg_oob.go @@ -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{}) +}