diff options
author | xengineering <me@xengineering.eu> | 2023-06-30 20:40:47 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2023-06-30 20:40:47 +0200 |
commit | dee833b803494ce962c577ddf950795a2fd490ae (patch) | |
tree | f353e8c8d653d9d94ab7e45a624ac8bd27f0e32f /xmpp/jid.go | |
parent | e2c057571ae309cf503851ab8f63c2159f2ef4bc (diff) | |
download | limox-dee833b803494ce962c577ddf950795a2fd490ae.tar limox-dee833b803494ce962c577ddf950795a2fd490ae.tar.zst limox-dee833b803494ce962c577ddf950795a2fd490ae.zip |
Send initial presence after resource result
This completes the connection process.
Diffstat (limited to 'xmpp/jid.go')
-rw-r--r-- | xmpp/jid.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xmpp/jid.go b/xmpp/jid.go index 0446d19..fd0d7ae 100644 --- a/xmpp/jid.go +++ b/xmpp/jid.go @@ -57,10 +57,12 @@ func hasBind(e []xml.Token) bool { } func (s *session) sendBind() { + s.resourceReq = fmt.Sprintf("%016x", rand.Uint64()) + iqStart := xml.StartElement{ xml.Name{"jabber:client", "iq"}, []xml.Attr{ - xml.Attr{xml.Name{"", "id"}, fmt.Sprintf("%016x", rand.Uint64())}, + xml.Attr{xml.Name{"", "id"}, s.resourceReq}, xml.Attr{xml.Name{"", "type"}, "set"}, }, } |