From 2454a3b2d650692d94012cc6b443d1c085ca57f7 Mon Sep 17 00:00:00 2001 From: Martin/Geno Date: Fri, 21 Jun 2019 02:51:43 +0200 Subject: [PATCH] add html support for messages --- xmpp/client_message.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/xmpp/client_message.go b/xmpp/client_message.go index 0bb7771..e22a3cf 100644 --- a/xmpp/client_message.go +++ b/xmpp/client_message.go @@ -17,6 +17,7 @@ type MessageClient struct { Subject string `xml:"subject,omitempty"` Body string `xml:"body,omitempty"` + HTML *HTML Thread string `xml:"thread,omitempty"` Error *ErrorClient @@ -25,3 +26,12 @@ type MessageClient struct { // Any hasn't matched element Other []XMLElement `xml:",any"` } +type HTML struct { + XMLName xml.Name `xml:"http://jabber.org/protocol/xhtml-im html"` + Body HTMLBody + Lang string `xml:"xml:lang,attr,omitempty"` +} +type HTMLBody struct { + XMLName xml.Name `xml:"http://www.w3.org/1999/xhtml body"` + Body XMLElement +}