From e5257c8a9c3dfcda52fb96fcac2ac81aefb52e55 Mon Sep 17 00:00:00 2001 From: xengineering Date: Tue, 4 Jul 2023 13:57:26 +0200 Subject: Reduce complexity of streamFeatures struct --- xmpp/streams.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/xmpp/streams.go b/xmpp/streams.go index 9c90554..cc83934 100644 --- a/xmpp/streams.go +++ b/xmpp/streams.go @@ -65,11 +65,9 @@ func iqHandler(s *session, e []xml.Token) { } type streamFeatures struct { - Mechanisms struct { - Items []struct { - Type string `xml:",innerxml"` - } `xml:"mechanism"` - } `xml:"mechanisms"` + Mechanisms []struct { + Type string `xml:",chardata"` + } `xml:"mechanisms>mechanism"` } func streamFeaturesHandler(s *xml.StartElement, d *xml.Decoder, c chan<- any) { -- cgit v1.2.3-70-g09d2