Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Remove fields that should actually never be used. The idea is that the
non-normalised parts MUST actually have never been used for comparison,
and are therefore not really needed. If only for printing and using them
in the
to
andfrom
attributes of a stanza, clients SHOULD alsostringprep anyway, so the fact that the server might provide
non-normalised strings might be a problem for clients who're not
enforced to normalise them.
I've also been verifying how many other XMPP implementations tackle this
issue, and I've seen many other servers, and also a bunch of client
frameworks, simply capturing the parts and normalising them, and
building data structures that keep only their normalised pieces.
Note, I imagine this to make for a version 2.0, as it contains kinda breaking changes. Libraries shouldn't be looking into the data structure and should use the data setters and getters exposed by the API, but well, everywhere there's pattern-matching against the jid record.
Also interesting, using uuids for all three parts of the jid: