From e7c57cad970e7582d843816be59d2ec1a75b6ce4 Mon Sep 17 00:00:00 2001 From: Martin/Geno Date: Wed, 5 Jun 2019 03:58:51 +0200 Subject: [PATCH] complete XEP-0333 support (with displayed) --- msg_chat_markers.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/msg_chat_markers.go b/msg_chat_markers.go index 2940c1f..418a09a 100644 --- a/msg_chat_markers.go +++ b/msg_chat_markers.go @@ -18,7 +18,21 @@ type MarkReceived struct { ID string } +type MarkDisplayed struct { + MsgExtension + XMLName xml.Name `xml:"urn:xmpp:chat-markers:0 displayed"` + ID string +} + +type MarkAcknowledged struct { + MsgExtension + XMLName xml.Name `xml:"urn:xmpp:chat-markers:0 acknowledged"` + ID string +} + func init() { typeRegistry.MapExtension(PKTMessage, xml.Name{"urn:xmpp:chat-markers:0", "markable"}, Markable{}) typeRegistry.MapExtension(PKTMessage, xml.Name{"urn:xmpp:chat-markers:0", "received"}, MarkReceived{}) + typeRegistry.MapExtension(PKTMessage, xml.Name{"urn:xmpp:chat-markers:0", "displayed"}, MarkDisplayed{}) + typeRegistry.MapExtension(PKTMessage, xml.Name{"urn:xmpp:chat-markers:0", "acknowledged"}, MarkAcknowledged{}) }