From 57845892dbfc6db0648b18e418a6b15218d8526c Mon Sep 17 00:00:00 2001 From: xengineering Date: Wed, 5 Jul 2023 22:01:14 +0200 Subject: Migrate bind receive to new iq struct --- xmpp/iq.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'xmpp/iq.go') diff --git a/xmpp/iq.go b/xmpp/iq.go index 4c91b58..cd96384 100644 --- a/xmpp/iq.go +++ b/xmpp/iq.go @@ -47,13 +47,9 @@ func (s *session) sendBind() { } } -type iqResponse struct { - Jid string `xml:"urn:ietf:params:xml:ns:xmpp-bind bind>jid"` -} - -func handleIqResponse(s *session, i iqResponse) { - if i.Jid != "" { - s.jid = i.Jid +func handleIq(s *session, i iq) { + if i.Bind.Jid != "" { + s.jid = i.Bind.Jid s.sendPresence() return } -- cgit v1.2.3-70-g09d2