diff --git a/xmpp-displayed_markers.go b/xmpp-displayed_markers.go new file mode 100644 index 0000000..260539d --- /dev/null +++ b/xmpp-displayed_markers.go @@ -0,0 +1,19 @@ +package main + +// Partial implementation of XEP-0333: Displayed Markers +// https://xmpp.org/extensions/xep-0333.html + +import ( + "encoding/xml" + "gosrc.io/xmpp/stanza" +) + +type Marker struct { + stanza.MsgExtension + XMLName xml.Name `xml:"urn:xmpp:chat-markers:0 displayed"` + ID string `xml:"id,attr"` +} + +func init() { + stanza.TypeRegistry.MapExtension(stanza.PKTMessage, xml.Name{Space: "urn:xmpp:reply:0", Local: "displayed"}, Marker{}) +}