-
Notifications
You must be signed in to change notification settings - Fork 29
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: Disable remote domain users for Proteus conversation [WPB-10788] #3432
feat: Disable remote domain users for Proteus conversation [WPB-10788] #3432
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3432 +/- ##
===========================================
+ Coverage 44.83% 44.88% +0.04%
===========================================
Files 466 466
Lines 15667 15683 +16
Branches 2637 2642 +5
===========================================
+ Hits 7024 7039 +15
Misses 7885 7885
- Partials 758 759 +1
Continue to review full report in Codecov by Sentry.
|
Built wire-android-staging-compat-pr-3432.apk is available for download |
Built wire-android-dev-debug-pr-3432.apk is available for download |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a question 🤔
@@ -82,7 +82,7 @@ class SearchUserViewModel @Inject constructor( | |||
} | |||
|
|||
private suspend fun search(query: String) { | |||
val (searchTerm, domain) = federatedSearchParser(query) | |||
val (searchTerm, domain) = federatedSearchParser(query, addMembersSearchNavArgs?.isOtherDomainAllowed ?: true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should really the default be true if isOtherDomainAllowed
is null? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that question made me to think more about the implementation and I've noticed that all the addMembersSearchNavArgs
might be null here (in case of creating a new conversation).
So I've updated PR and moved all the isOtherDomainAllowed
logic directly into SearchUserViewModel
.
Answering your question: if addMembersSearchNavArgs is null we use only default team protocol to get if other domain allowed.
Built wire-android-staging-compat-pr-3432.apk is available for download |
Built wire-android-dev-debug-pr-3432.apk is available for download |
…disable_remote_domain_users_for_proteus_conversation # Conflicts: # kalium
Quality Gate passedIssues Measures |
Built wire-android-staging-compat-pr-3432.apk is available for download |
Built wire-android-dev-debug-pr-3432.apk is available for download |
What's new in this PR?
Issues
We need to disable adding users from another domain into the Proteus conversation or if the team's default protocol is Proteus.
Solutions
add
isOtherDomainAllowed
field intoAddMembersSearchNavArgs
and use it inSearchUserViewModel
by passing toFederatedSearchParser
.in updated kalium
FederatedSearchParser
accept newisOtherDomainAllowed
and "do the magic".Waiting for kalium PR wireapp/kalium#3004