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: Returns an error on join request with no display name. #13546

Merged
merged 5 commits into from
Jul 19, 2023

Conversation

damencho
Copy link
Member

When someone tries to join a room with lobby enabled and display name is not set returns an error.

@@ -400,6 +400,17 @@ process_host_module(main_muc_component_config, function(host_module, host)
end
end

-- Check for display name if missing return an error
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be a separate module? This functionality is not exclusive to lobby is it?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is for lobby, we are reporting this through jiconop when lobby is enabled so we can make the display name required.

reply:tag('feature', { var = DISPLAY_NAME_REQUIRED_FEATURE }):up();

Now when dropping initial connection on opening pre-join we are adding this if someone tries to join without a display name when lobby is enabled to fail and set the UI that display name is required, so the participant enters a dispalyname and retries.

Copy link
Member Author

Choose a reason for hiding this comment

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

But this does not work if prejoin is not enabled ... the tests catch that failing case ... need to look into

@hristoterezov
Copy link
Member

@damencho What is the idea of the feature? Is it that only for lobby we require always a display name? Or do we want to always requre it?

I was wondering if we should add a config for enabling or disabling this?

@damencho
Copy link
Member Author

@hristoterezov this is to implement a feature which we already have, but we will lose after merging the PR where we no longer create a connection on pre-join screen.
And this is only for lobby, to require having a display name when lobby is enabled. And that feature and currently doesn't have any config to enable/disable it - we require display name in order to start knocking in Lobby.

@damencho
Copy link
Member Author

The PR covers now the prejoin screen and not Lobby screen (this is when prejoin is disabled), so I'm working on adding that, which will require changes in both ljm and this PR. But I'll push everything on top of this, as a separate commits.

@hristoterezov
Copy link
Member

Got it! Thanks for the explanation!

@damencho
Copy link
Member Author

I have pushed the changes about the lobby screen when preJoin is disabled, which should fix the tests.

But I think we should not merge this till we merge #13538 as there is logic here that assumes the connection is established when opening the prejoinscreen ... and we need to sync the changes from the other PR with this change and test it.

@damencho damencho force-pushed the req-displayname branch 2 times, most recently from 296b221 to e2c2614 Compare July 12, 2023 21:54
@damencho
Copy link
Member Author

I force pushed as it is rebased now on top of #13538 and is working with that change with no connection established while on prejoin screen.

@damencho damencho force-pushed the req-displayname branch 5 times, most recently from 80aa55d to b44fe90 Compare July 18, 2023 19:53
This was used on showing prejoin when connection was established on showing prejoin. We no longer establish it at that time, so it is not possible to hit it and act on it.
@damencho
Copy link
Member Author

Jenkins test this please.

@damencho damencho merged commit ff70025 into master Jul 19, 2023
6 checks passed
@damencho damencho deleted the req-displayname branch July 19, 2023 20:35
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.

3 participants