-
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: create new users_with_power_levels
fn
#3182
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3182 +/- ##
==========================================
+ Coverage 83.78% 83.81% +0.02%
==========================================
Files 232 232
Lines 23958 23965 +7
==========================================
+ Hits 20074 20086 +12
+ Misses 3884 3879 -5 ☔ View full report in Codecov by Sentry. |
8c75d2f
to
43b1621
Compare
…sers' power levels Also, make sure it just returns an empty map if this info is not available, instead of crashing.
43b1621
to
b9671d8
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.
Thanks! Tiny comments here :-)
assert_eq!(users_with_power_levels.len(), 1); | ||
assert_eq!(users_with_power_levels[user_id!("@example:localhost")], 100); |
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.
Can you make it so that the test data contains power levels for two different users?
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 guess I can change the DEFAULT_SYNC contents, but I'm afraid that might break some other tests.
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.
Without changing the contents of DEFAULT_SYNC
, could we return our own content from a json!()
macro invoke instead?
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 created a new ADMIN_AND_MOD_SYNC
with only the needed data for the test.
Co-authored-by: Benjamin Bouvier <[email protected]> Signed-off-by: Jorge Martin Espinosa <[email protected]>
…h-no-power-level-info
d76ee98
to
49830c8
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.
Thanks!
🥲 |
It maps user ids to users' power levels.
Also, make sure it just returns an empty map if this info is not available, instead of crashing.
Then use it in the FFI side to output updated data for the
RoomInfo
.Signed-off-by: