From 794ed98f9f7af8e854f896b03fb3431b8c80ab96 Mon Sep 17 00:00:00 2001 From: Martin Date: Wed, 10 Jan 2024 13:57:27 +0100 Subject: [PATCH] Provide access to xml:lang information. (#168) --- xmpp.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xmpp.go b/xmpp.go index 88fed91..042c278 100644 --- a/xmpp.go +++ b/xmpp.go @@ -888,6 +888,7 @@ type Chat struct { Thread string Ooburl string Oobdesc string + Lang string Roster Roster Other []string OtherElem []XMLElement @@ -964,6 +965,7 @@ func (c *Client) Recv() (stanza interface{}, err error) { Other: v.OtherStrings(), OtherElem: v.Other, Stamp: stamp, + Lang: v.Lang, } return chat, nil case *clientQuery: @@ -1314,6 +1316,7 @@ type clientMessage struct { ID string `xml:"id,attr"` To string `xml:"to,attr"` Type string `xml:"type,attr"` // chat, error, groupchat, headline, or normal + Lang string `xml:"lang,attr"` // These should technically be []clientText, but string is much more convenient. Subject string `xml:"subject"`