aboutsummaryrefslogtreecommitdiff
path: root/xmpp/extensions/extensions.go
diff options
context:
space:
mode:
Diffstat (limited to 'xmpp/extensions/extensions.go')
-rw-r--r--xmpp/extensions/extensions.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/xmpp/extensions/extensions.go b/xmpp/extensions/extensions.go
index 679b428..41a58fa 100644
--- a/xmpp/extensions/extensions.go
+++ b/xmpp/extensions/extensions.go
@@ -248,6 +248,19 @@ type MessageDelayLegacy struct {
Stamp string `xml:"stamp,attr"`
}
+// MessageAddresses is from XEP-0033
+type MessageAddresses struct {
+ XMLName xml.Name `xml:"http://jabber.org/protocol/address addresses"`
+ Addresses []MessageAddress
+}
+
+// MessageAddress is from XEP-0033
+type MessageAddress struct {
+ XMLName xml.Name `xml:"address"`
+ Type string `xml:"type,attr"`
+ Jid string `xml:"jid,attr"`
+}
+
// Namespace is a namespace!
func (c PresenceNickExtension) Namespace() string {
return c.XMLName.Space
@@ -430,4 +443,10 @@ func init() {
"jabber:x:delay",
"x",
}, MessageDelayLegacy{})
+
+ // message addresses
+ stanza.TypeRegistry.MapExtension(stanza.PKTMessage, xml.Name{
+ "http://jabber.org/protocol/address",
+ "addresses",
+ }, MessageAddresses{})
}