From 877a6ab949661ee19312a30182f1f26c205964e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?CORNIERE=20R=C3=A9mi?= Date: Wed, 29 Apr 2020 10:18:03 +0200 Subject: [PATCH] Support for XEP-203 Need to finish XEP-0082 before merge --- stanza/delay.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 stanza/delay.go 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{}) +}