-
Notifications
You must be signed in to change notification settings - Fork 325
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
[WPB-6144] Prevent MLS one-to-one messaging for a blocking user (q1-2024
) - no dependencies on the notification subsystem
#3922
Conversation
* Test: no MLS 1-to-1 when a connection is blocked * Test: a test with expected behavior after blocking the connection * Check if sending a msg to 1-to-1 and not connected * Add a changelog * WIP: Debugging a test failure * Update the confirming test * Revert "Check if sending a msg to 1-to-1 and not connected" This reverts commit c4af150. * WIP: generalise the Update.blockConv handler * Connections: Also block MLS one2one conv when blocking conn * Test: Parameterise over One2OneScenario * Add the missing connection ID in an internal endpoint * Wrap a function comment for readability * Introduce a Galley internal endpoint: blocking a qualified conversation * WIP: Check if an MLS 1-1 conv exists before blocking What is left to do is to make this check work for an MLS 1-1 conv that can be remote * Make upsertOne2OneConv always take a Conv ID Brig can determine this ID based on protocol of the conversation or read it from the DB. Inventing this in galley causes more trouble for having two One2One convs for proteus and mls. * WIP: Remove user from 1:1 MLS conv when they block someone * WIP: Remove mls clients on connection block * fixup! WIP: Remove mls clients on connection block * Make sure 1-1 conv is established before updating * Finalise the bug-confirming test * Remove debugging output from application code * Fix a changelog * Remove redundant constraints * Properly check if an MLS 1-1 conversation exists before blocking it * Remove more of unused code * Remove an unused connection ID in an internal Galley endpoint for blocking a conv --------- Co-authored-by: Akshay Mankar <akshay@wire.com>
case HTTP.statusCode (HTTP.responseStatus response) of | ||
403 -> pure False | ||
400 -> pure False | ||
_ {- 200 is assumed -} -> do |
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 we throw
for other non-200 values?
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.
I think this did the job the way it is. I'm reworking this in a PR for unblocking a user, and there I take a finer grained approach.
Co-authored-by: Igor Ranieri Elland <54423+elland@users.noreply.github.com>
Co-authored-by: Igor Ranieri Elland <54423+elland@users.noreply.github.com>
The PR obsoletes PR #3900.
This is a backport of PR #3889 and PR #3906 from
develop
toq1-2024
.Tracked by https://wearezeta.atlassian.net/browse/WPB-6144.
Checklist
changelog.d