-
Notifications
You must be signed in to change notification settings - Fork 742
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
Feature/bca/room caps restricted #3663
Conversation
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 work.
I cannot test on matrix.org yet AFAIU.
Some remark in the mean time.
) | ||
|
||
data class RoomVersionInfo( | ||
val version: String, | ||
val status: RoomVersionStatus | ||
) | ||
|
||
@JsonClass(generateAdapter = true) |
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 not a Json class?
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.
fixed
data class RoomVersionCapabilities( | ||
val defaultRoomVersion: String, | ||
val supportedVersion: List<RoomVersionInfo> | ||
val supportedVersion: List<RoomVersionInfo>, | ||
val capabilities: Map<String, RoomCapabilitySupport>? |
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.
What are the keys?
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.
added a comment
return info.preferred == byRoomVersion || info.support.contains(byRoomVersion) | ||
} | ||
|
||
fun versionOverrideForFeature(feature: String) : String? { |
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 add some doc for this public APIs?
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
|
||
suspend fun setJoinRulePublic() | ||
suspend fun setJoinRuleInviteOnly() | ||
suspend fun setJoinRuleRestricted(allowList: List<String>) |
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.
These 3 fun should be moved to StateService
and documented please.
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.
Initially it was in state service, but the join restricted is doing more than just state, it is also computing the via parameters. It feels strange to inject he viaParameterFinder in state event as it requires roomGetter.
I have put it back in StateService
import org.matrix.android.sdk.api.session.room.model.RoomJoinRulesAllowEntry | ||
import org.matrix.android.sdk.api.session.room.model.RoomJoinRulesContent | ||
|
||
interface RoomFeaturePreset { |
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.
Interface and class must be moved to internal package and declared internal.
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.
It's public, used in CreateSpaceViewModelTask for example
android:layout_width="match_parent" | ||
android:layout_height="wrap_content"> | ||
|
||
<com.google.android.material.appbar.CollapsingToolbarLayout |
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.
Is this used?
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.
yes it's snapping but no animation
<string name="room_create_member_of_space_name_can_join">Members of Space %s can find, preview and join.</string> | ||
<string name="allow_space_member_to_find_and_access">Allow space members to find and access.</string> | ||
<string name="spaces_which_can_access">Spaces which can access</string> | ||
<string name="decide_which_spaces_can_access">Decide which spaces can access this room. If a space is selected its members will be able to find and join Room name.</string> |
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.
Too many spaces in room. If
and find and
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
|
||
<string name="room_using_unstable_room_version">This room is running room version %s, which this homeserver has marked as unstable.</string> | ||
<string name="room_upgrade_to_recommended_version">Upgrade to the recommended room version</string> | ||
|
||
<string name="error_failed_to_join_room">Sorry, an error occurred while trying to join: %s</string> | ||
|
||
<string name="upgrade_room_for_restricted">Anyone in %s will be able to find and join this room - no need to manually invite everyone. You’ll be able to change this in room settings anytime.</string> |
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.
dup spaces everyone. You’ll
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
|
||
<string name="room_using_unstable_room_version">This room is running room version %s, which this homeserver has marked as unstable.</string> | ||
<string name="room_upgrade_to_recommended_version">Upgrade to the recommended room version</string> | ||
|
||
<string name="error_failed_to_join_room">Sorry, an error occurred while trying to join: %s</string> | ||
|
||
<string name="upgrade_room_for_restricted">Anyone in %s will be able to find and join this room - no need to manually invite everyone. You’ll be able to change this in room settings anytime.</string> | ||
<string name="upgrade_room_for_restricted_no_param">Anyone in a parent space will be able to find and join this room - no need to manually invite everyone. You’ll be able to change this in room settings anytime.</string> |
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.
Dup everyone. You
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
<string name="upgrade_room_for_restricted">Anyone in %s will be able to find and join this room - no need to manually invite everyone. You’ll be able to change this in room settings anytime.</string> | ||
<string name="upgrade_room_for_restricted_no_param">Anyone in a parent space will be able to find and join this room - no need to manually invite everyone. You’ll be able to change this in room settings anytime.</string> | ||
|
||
<string name="upgrade_room_for_restricted_note">Please note upgrading will make a new version of the room. All current messages will stay in this archived room.</string> |
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.
room. All
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
|
||
<Button | ||
android:id="@+id/cancelButton" | ||
style="@style/Widget.Vector.Button.Outlined" |
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.
Style "Widget.Vector.Button.Text"
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
eae2f73
to
85d3941
Compare
85d3941
to
c475418
Compare
c475418
to
aaa9c7e
Compare
Fixes #3509
Fixes #3665
Fixes #3508
New setting screen that allow to use the new restricted access rule
If the selected room is using a version that do not support restricted, a button will be displayed to migrate the room first (shown only if the server supports the restricted join rule as per Room caps MSC