diff options
author | xengineering <me@xengineering.eu> | 2023-06-30 20:43:12 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2023-06-30 20:43:25 +0200 |
commit | 0774275597131badfba5045b14f9632a78d063e8 (patch) | |
tree | 51d302e473b5474de8ed74dad42a387fa3e441fb /xmpp/jid.go | |
parent | e2c057571ae309cf503851ab8f63c2159f2ef4bc (diff) | |
parent | ff92af1410f3c37c6cfa5fb7ff6e322c8d691121 (diff) | |
download | limox-0774275597131badfba5045b14f9632a78d063e8.tar limox-0774275597131badfba5045b14f9632a78d063e8.tar.zst limox-0774275597131badfba5045b14f9632a78d063e8.zip |
Merge branch 'initial-presence'
This broadcasts that the LimoX client is ready for communication.
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"}, }, } |