Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Adds an option to randomize user-id used when client logins. #501

Merged
merged 2 commits into from
Sep 27, 2023

Conversation

damencho
Copy link
Member

Updates to latest desktop lib dependency to fix ALWAYS_TRUST_MODE_ENABLED.

Updates to latest desktop lib dependency to fix ALWAYS_TRUST_MODE_ENABLED.
long random = RANDOM.nextInt();
Jid newJid = JidCreate.entityBareFrom(
Localpart.from(
jid.getLocalpartOrNull() + "-" + String.format("%8h", random).replace(' ', '0')),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need .replace(' ', '0')? Why "%h" (it calls hashCode) instead of %x?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used your code from here:

this.callResource = JidCreate.entityBareFrom(

@damencho damencho merged commit 3de47d0 into master Sep 27, 2023
0 of 2 checks passed
@damencho damencho deleted the random-user branch September 27, 2023 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants