diff --git a/stanza/delay.go b/stanza/delay.go new file mode 100644 index 0000000..ee02083 --- /dev/null +++ b/stanza/delay.go @@ -0,0 +1,20 @@ +package stanza + +import "encoding/xml" + +/* +Support for: +- XEP-0203: Delayed Delivery: https://xmpp.org/extensions/xep-0203.html +*/ + +const NSDelay = "urn:xmpp:delay" + +type Delay struct { + XMLName xml.Name `xml:"urn:xmpp:delay delay"` + From string `xml:"from,attr"` + date JabberDate // TODO +} + +func init() { + TypeRegistry.MapExtension(PKTMessage, xml.Name{Space: NSDelay, Local: "delay"}, Delay{}) +}