-
Notifications
You must be signed in to change notification settings - Fork 258
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
refactor(sdk-crypto): Room key sharing, introduce extensible strategy #3605
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3605 +/- ##
==========================================
+ Coverage 83.84% 83.86% +0.02%
==========================================
Files 253 254 +1
Lines 25884 25892 +8
==========================================
+ Hits 21702 21714 +12
+ Misses 4182 4178 -4 ☔ View full report in Codecov by Sentry. |
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.
Left a small nit about our module convention, looks good otherwise.
@@ -12,23 +12,25 @@ | |||
// See the License for the specific language governing permissions and | |||
// limitations under the License. | |||
|
|||
mod share_strategy; |
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.
Please run:
$ git mv crates/matrix-sdk-crypto/src/session_manager/group_sessions.rs crates/matrix-sdk-crypto/src/session_manager/group_sessions/mod.rs
to rename and move group_sessions.rs
file into the group_sessions
folder, we're using this module convention across all our crates. For more info about Rust modules check out: https://doc.rust-lang.org/reference/items/modules.html.
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.
Done
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 you need a small change in that file after it was moved, CI will let us know.
Please do remember to update the changelog when landing changes like this. |
Fixes: #3562
Extracted the logic to collect the devices that should receive a room key.
Introduce a new CollectStrategy that will define how to sort devices that should receive the room_key and those that should receive a witheld code.
There is no functional changes in this PR, a following PR will introduce an IdentityBased strategy that will select devices depending on if they are signed by their owner.
Signed-off-by: