From 13eeca2177dc767aa7d01c9caed95ae2be736471 Mon Sep 17 00:00:00 2001 From: xengineering Date: Wed, 5 Jul 2023 21:59:37 +0200 Subject: Add new generic iq struct This will cover all iq use cases with optional arguments and sub-elements. --- xmpp/iq.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/xmpp/iq.go b/xmpp/iq.go index 1c12c8c..4c91b58 100644 --- a/xmpp/iq.go +++ b/xmpp/iq.go @@ -7,6 +7,15 @@ import ( "log" ) +type iq struct { + XMLName xml.Name `xml:"jabber:client iq"` + Type string `xml:"type,attr,omitempty"` + Id string `xml:"id,attr,omitempty"` + Bind struct{ + Jid string `xml:"jid,omitempty"` + } `xml:"urn:ietf:params:xml:ns:xmpp-bind bind,omitempty"` +} + type bindRequest struct { Bind struct { Xmlns string `xml:"xmlns,attr"` -- cgit v1.2.3-70-g09d2