From b235acdc6eb350c5f700372b83e8e99f7c87e2c9 Mon Sep 17 00:00:00 2001 From: Derek Brown Date: Wed, 20 Jan 2021 09:24:46 -0500 Subject: [PATCH] fix: add xml namespace prefix to message lang attrs --- stanza/message.go | 3 ++- stanza/packet.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/stanza/message.go b/stanza/message.go index 954d515..a6364b0 100644 --- a/stanza/message.go +++ b/stanza/message.go @@ -8,9 +8,10 @@ import ( // ============================================================================ // Message Packet +// LocalizedString is a string node with a language attribute. type LocalizedString struct { Content string `xml:",chardata"` - Lang string `xml:"lang,attr,omitempty"` + Lang string `xml:"http://www.w3.org/XML/1998/namespace lang,attr,omitempty"` } // Message implements RFC 6120 - A.5 Client Namespace (a part) diff --git a/stanza/packet.go b/stanza/packet.go index 567796d..00f76ba 100644 --- a/stanza/packet.go +++ b/stanza/packet.go @@ -10,7 +10,7 @@ type Attrs struct { Id string `xml:"id,attr,omitempty"` From string `xml:"from,attr,omitempty"` To string `xml:"to,attr,omitempty"` - Lang string `xml:"lang,attr,omitempty"` + Lang string `xml:"http://www.w3.org/XML/1998/namespace lang,attr,omitempty"` } type packetFormatter interface {