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

Support entering mail in user invite screen #4051

Merged
merged 6 commits into from
Sep 24, 2021

Conversation

BillCarsonFr
Copy link
Member

This PR adds support to invite by mail from the user invite dialog.
If the search term is an email, then the app will try to lookup this email from the configured identity server. If a match is found the result will appear with some profile information, if no match it is still possible to tap the raw email and send the invite.
For now only email 3pid is supported (not phone numbers)

image

If there is no Identity Server the user will see a call to action to set it up
image

If the Identity server is setup but user didn't consent to use it, then a dedicated call to action is added:

image

Fixes #4042

@github-actions
Copy link

github-actions bot commented Sep 21, 2021

Unit Test Results

  34 files  ±0    34 suites  ±0   20s ⏱️ ±0s
  73 tests ±0    73 ✔️ ±0  0 💤 ±0  0 ❌ ±0 
180 runs  ±0  180 ✔️ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 9a30da1. ± Comparison against base commit 9a30da1.

♻️ This comment has been updated with latest results.

@BillCarsonFr BillCarsonFr added the Z-NextRelease For issues and PRs which should be included in the NextRelease. label Sep 23, 2021
Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

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

Thanks, good work! A few remarks.

@@ -202,6 +202,8 @@ internal class DefaultIdentityService @Inject constructor(

identityStore.setUrl(urlCandidate)
identityStore.setToken(token)
// could we remember if it was previously given?
identityStore.setUserConsent(false)
Copy link
Member

Choose a reason for hiding this comment

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

This line is not necessary, the line 203 already erase all the existing data, including the consent

@@ -202,6 +202,8 @@ internal class DefaultIdentityService @Inject constructor(

identityStore.setUrl(urlCandidate)
identityStore.setToken(token)
// could we remember if it was previously given?
Copy link
Member

Choose a reason for hiding this comment

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

For now we keep only one IdentityDataEntity, but yes, why not change that in the future

@@ -65,7 +65,7 @@ class DiscoverySettingsViewModel @AssistedInject constructor(
setState {
copy(
identityServer = Success(identityServerUrl),
userConsent = false
userConsent = identityService.getUserConsent()
Copy link
Member

Choose a reason for hiding this comment

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

so I think this change is not necessary anymore

Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

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

Thanks for the update.
I think my last 3 remarks are not mandatory.
Let's merge this PR

@bmarty bmarty merged commit 9a30da1 into develop Sep 24, 2021
@bmarty bmarty deleted the feature/bca/invite_user_by_mail branch September 24, 2021 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Z-NextRelease For issues and PRs which should be included in the NextRelease.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Private space invite bottomsheet only offering inviting by usename not by email
3 participants