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

Have "email" as a people search query type supported in the "Add People" dialog #14331

Closed
raphaelbadawi opened this issue Feb 6, 2024 · 10 comments
Labels
feature-request Issue which suggest an idea, enhancement or feature to implement stale

Comments

@raphaelbadawi
Copy link
Contributor

Is your feature request related to a problem you are facing?

In my hosted Jitsi instance, I would like to use the AddPeopleDialog widget to get emails from an autocomplete API, and when a selection is made, another API endpoint is called (sending the actual invites would be the responsibility of this API endpoint, which would return 200 OK if everything went accordingly).

I don't actually authenticate users in my Jitsi instances, so the AddPeopeDialog doesn't even show when trying to sort things out for this kind of autocompletion.

Describe the solution you'd like

Currently, the AddPeopleDialog supports phone (with SIP protocol), rooms and users (registered in Prosody). Since I don't actually authenticate users in my Jitsi instances, I just want to have the AddPeopleDialog widget being able to send email invites using my own email directory. Right now, if SIP is not enabled, JWT token is required to show the dialog (as it is handled by the isAddPeopleEnabled function). If emails were to be their own peoleSearchQueryType, JWT token would be required only if we have "user" or "room" in peopleSearchQueryTypes config.

Describe alternatives you've considered

If I want to make things work for email autocompletion, I have to make ugly overrides in the source code before building my front app. I would much prefer doing a clean development respecting the contributing guidelines and making a pull request. I'm willing to make the actual development but I prefer to make the feature request first to see if such a PR with those specs may be accepted or not.

@raphaelbadawi raphaelbadawi added the feature-request Issue which suggest an idea, enhancement or feature to implement label Feb 6, 2024
@abhinavs1920
Copy link

I would like to work on this issue. Thank You!!!

@jlemangarin
Copy link

@damencho What do you think ? Can we start to work on it ?

@damencho
Copy link
Member

How will you authenticate the http requests that are executed in the addPeopleDialog?

@raphaelbadawi
Copy link
Contributor Author

Well right now in my current build I've added "credentials: "include"" in the fetch calls coming from searchDirectory and invitePeopleAndChatRooms. So cookies are included in the request and so my directory service can work things out.

This is not an ideal solution.

I guess it would be better to be able to add custom keys and values in the query string, via the config.js, so whatever the directory service is expecting it could just be added to the query string by tweaking config.js.

@damencho
Copy link
Member

Adding something in config.js is not an option, as it is publicly accessible. You need something per user as the jwt.

@raphaelbadawi
Copy link
Contributor Author

Even if the something actually refers to a localStorage key for example?

@damencho
Copy link
Member

Yeah, maybe read a value from there and add it as Authorization to the request, that will work.
If you are preparing a PR, make sure this is turned off by default and current behaviour is not changed.

@raphaelbadawi
Copy link
Contributor Author

Okay I will base the PR on those specs ;-) Thanks!

@raphaelbadawi
Copy link
Contributor Author

Here is the PR for this => #14610

Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Jun 13, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Issue which suggest an idea, enhancement or feature to implement stale
Projects
None yet
Development

No branches or pull requests

4 participants