aboutsummaryrefslogtreecommitdiff
path: root/xmpp/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'xmpp/extensions')
-rw-r--r--xmpp/extensions/extensions.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/xmpp/extensions/extensions.go b/xmpp/extensions/extensions.go
index 78de47d..2d547af 100644
--- a/xmpp/extensions/extensions.go
+++ b/xmpp/extensions/extensions.go
@@ -180,6 +180,12 @@ type ClientMessage struct {
Extensions []stanza.MsgExtension `xml:",omitempty"`
}
+// Replace is from XEP-0308
+type Replace struct {
+ XMLName xml.Name `xml:"urn:xmpp:message-correct:0 replace"`
+ Id string `xml:"id,attr"`
+}
+
// Namespace is a namespace!
func (c PresenceNickExtension) Namespace() string {
return c.XMLName.Space
@@ -225,6 +231,11 @@ func (c ComponentPrivilege) Namespace() string {
return c.XMLName.Space
}
+// Namespace is a namespace!
+func (c Replace) Namespace() string {
+ return c.XMLName.Space
+}
+
// Name is a packet name
func (ClientMessage) Name() string {
return "message"
@@ -291,4 +302,10 @@ func init() {
"urn:xmpp:privilege:1",
"privilege",
}, ComponentPrivilege{})
+
+ // message edit
+ stanza.TypeRegistry.MapExtension(stanza.PKTMessage, xml.Name{
+ "urn:xmpp:message-correct:0",
+ "replace",
+ }, Replace{})
}