diff options
author | xengineering <me@xengineering.eu> | 2023-07-04 13:57:26 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2023-07-04 13:57:26 +0200 |
commit | e5257c8a9c3dfcda52fb96fcac2ac81aefb52e55 (patch) | |
tree | 1d63cdf9d56857f69b3c2895cd177182f758c44b | |
parent | 92534f5af88b42665ad44f2495fe5dfb116d3406 (diff) | |
download | limox-e5257c8a9c3dfcda52fb96fcac2ac81aefb52e55.tar limox-e5257c8a9c3dfcda52fb96fcac2ac81aefb52e55.tar.zst limox-e5257c8a9c3dfcda52fb96fcac2ac81aefb52e55.zip |
Reduce complexity of streamFeatures struct
-rw-r--r-- | xmpp/streams.go | 8 |
1 files 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) { |