-
Notifications
You must be signed in to change notification settings - Fork 768
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
Reduce boilerplate with some minor sdk improvements #6799
Conversation
@@ -0,0 +1 @@ | |||
[Create Room] Reduce some boilerplate with room state event contents |
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.
Not sure about the changelog description, maybe I should have split the PR?
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 don't see anything wrong. It makes perfect sense to me
4923b95
to
bf8a8ae
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.
Nice cleanup! It can also be further simplified by adding a companion object function in RoomHistoryVisibility
companion object {
fun where(value: String) = values().find { it.value == value }
}
Consider it optional
I like your proposal, I will probably do it in a new PR in a more general way! |
bf8a8ae
to
a3ecb43
Compare
Kudos, SonarCloud Quality Gate passed! |
Type of change
Content
Improve some sdk stuff:
value
forGuestAccess
andRoomHistoryVisibility
(It is already the case for some existing enums) -> It limits the duplication of the keys by having them in a single placeContent
models inCreateRoomBodyBuilder
-> it removes some JSON keys duplication and adds clarity to the codeRoomFeaturePreset.setupInitialStates
from aList<Event>
to aList<CreateRoomStateEvent>
to be consistent withCreateRoomParams.initialStates
Motivation and context
Further developments related to #5525
Tests
By creating rooms in order to trigger the modified code, adding breakpoints and checking that the code was correctly executed.
Tested devices
Checklist