-
lovetox
must a IQ ID be unique within a session?
-
lovetox
i dont remember reading this anywhere
-
lovetox
but would be weird if a client would have to expect reoccurring iq ids
-
Zash
https://xmpp.org/rfcs/rfc6120.html#stanzas-attributes-id
-
jonas’
lovetox, It is up to the originating entity whether the value of the 'id' attribute is unique only within its current stream or unique globally.
-
jonas’
https://tools.ietf.org/html/rfc6120#section-8.1.3
-
lovetox
ok but it has to be one of either
-
lovetox
thought so, otherwise this would create weird problems
-
jonas’
lovetox, in which way?
-
jonas’
because a remote client may open a new stream without you noticing
-
jonas’
so you still might see duplicate IDs
-
Zash
At least avoid using the same (from, to, id) while one such iq is in flight
-
lovetox
i just thought about, if i send a iq get
-
lovetox
i only save the id, and if i see the id i call the callback
-
Zash
What if I reply with the same id from a different jid?
-
lovetox
its considered so unlikely that i can live with it
-
Zash
feels bad man
-
lovetox
you would have to guess the id in the right moment
-
lovetox
also iqs i send are uuid
-
lovetox
so the chance is lets say near zero
-
lovetox
it would be a major achievment if you could guess a uuid in the right moment
-
lovetox
but i guess i answered my own question
-
lovetox
because im in control of choosing the id
-
lovetox
not the server