summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2023-07-05 21:59:37 +0200
committerxengineering <me@xengineering.eu>2023-07-05 22:01:04 +0200
commit13eeca2177dc767aa7d01c9caed95ae2be736471 (patch)
treeaed8c84fd51ba3029ffeba709b48f5ac56c107d3
parent989c6ee9158f67cda2d6287d096c813075d13bd2 (diff)
downloadlimox-13eeca2177dc767aa7d01c9caed95ae2be736471.tar
limox-13eeca2177dc767aa7d01c9caed95ae2be736471.tar.zst
limox-13eeca2177dc767aa7d01c9caed95ae2be736471.zip
Add new generic iq struct
This will cover all iq use cases with optional arguments and sub-elements.
-rw-r--r--xmpp/iq.go9
1 files changed, 9 insertions, 0 deletions
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"`