-
Notifications
You must be signed in to change notification settings - Fork 252
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
sdk&ffi: server unstable features support for MSC4028 #3192
sdk&ffi: server unstable features support for MSC4028 #3192
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3192 +/- ##
==========================================
+ Coverage 83.81% 83.83% +0.01%
==========================================
Files 232 232
Lines 23965 23984 +19
==========================================
+ Hits 20087 20106 +19
Misses 3878 3878 ☔ View full report in Codecov by Sentry. |
Signed-off-by: hanadi92 <[email protected]>
Signed-off-by: hanadi92 <[email protected]>
f78838c
to
175fae5
Compare
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.
Sweet, thanks for writing a patch! Small comments here, I could take care of addressing those if you don't have the time :-)
/// Check whether [MSC 4028 push rule][rule] is enabled on the homeserver. | ||
/// | ||
/// [rule]: https://github.com/matrix-org/matrix-spec-proposals/blob/giomfo/push_encrypted_events/proposals/4028-push-all-encrypted-events-except-for-muted-rooms.md | ||
pub async fn can_homeserver_push_encrypted_event_to_device(&self) -> bool { |
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.
There's a bit of logic here, and I think that this could be useful for other clients. Could this method go to the SDK, next to unstable_features
, please? (and add a test for it too 🙏)
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.
of course! good hint. let me know if what I pushed goes in the direction of ur suggestion 👍
@@ -90,6 +90,7 @@ pub struct ClientBuilder { | |||
request_config: RequestConfig, | |||
respect_login_well_known: bool, | |||
server_versions: Option<Box<[MatrixVersion]>>, | |||
unstable_features: Option<BTreeMap<String, bool>>, |
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.
This is unused in ClientBuilder
, and can be removed. :-)
Co-authored-by: Benjamin Bouvier <[email protected]> Signed-off-by: Hanadi <[email protected]>
Signed-off-by: hanadi92 <[email protected]>
Signed-off-by: hanadi92 <[email protected]>
Signed-off-by: hanadi92 <[email protected]>
Signed-off-by: hanadi92 <[email protected]>
Thanks for the review! Changes are made accordingly. Let me know what you think about them :) I think the Code Coverage is breaking on a non-related issue. |
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.
Looks good! I'll try to apply my suggestions or address the latest comments myself. Thank you!
Signed-off-by: Benjamin Bouvier <[email protected]>
@bnjbvr Thanks a lot for taking the time in general and doing those changes! |
Fixes #3191
Allows support for fetching the unstable_features from
/_matrix/clients/versions
.Specifically, to be used for checking the state of org.matrix.msc4028 through ffi to the clients.
P.S. ^ I can split them into two PRs if necessary.
Signed-off-by: @hanadi92