-
Notifications
You must be signed in to change notification settings - Fork 738
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
Change default power to invite in private space + setting #4001
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.
One small mistake, else LGTM
@@ -77,7 +78,7 @@ internal class DefaultSpaceService @Inject constructor( | |||
if (isPublic) { | |||
this.roomAliasName = roomAliasLocalPart | |||
this.powerLevelContentOverride = (powerLevelContentOverride ?: PowerLevelsContent()).copy( | |||
invite = 0 | |||
invite = if (isPublic) 0 else Role.Moderator.value |
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 use Role.Default.value
instead of 0
?
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
@@ -70,7 +77,7 @@ sealed class EditablePermission(@StringRes val labelResId: Int) { | |||
|
|||
class UpgradeTheRoom : EventTypeEditablePermission( | |||
EventType.STATE_ROOM_TOMBSTONE, | |||
R.string.room_permissions_upgrade_the_room | |||
R.string.room_permissions_upgrade_the_space |
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 you wanted to write:
R.string.room_permissions_upgrade_the_room,
R.string.room_permissions_upgrade_the_space
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.
Thx, good catch
if (params.isPublic) { | ||
this.roomAliasName = params.spaceAlias | ||
this.powerLevelContentOverride = (powerLevelContentOverride ?: PowerLevelsContent()).copy( | ||
invite = 0 |
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.
Role.Default.value
this.guestAccess = GuestAccess.CanJoin | ||
} else { | ||
this.preset = CreateRoomPreset.PRESET_PRIVATE_CHAT | ||
visibility = RoomDirectoryVisibility.PRIVATE |
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.
why this one does not have this.
?
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
@@ -25,4 +25,5 @@ sealed class SpaceManagedSharedAction : VectorViewModelAction { | |||
object CreateRoom : SpaceManagedSharedAction() | |||
object ManageRooms : SpaceManagedSharedAction() | |||
object OpenSpaceAliasesSettings : SpaceManagedSharedAction() | |||
object OpenRoomPermissionSettings : SpaceManagedSharedAction() |
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.
Maybe you have hesitated with OpenSpacePermissionSettings
?
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.
Thanks for the update
69cfb42
to
70ebb3a
Compare
Fixes #3951
Change default power level to invite in private room to 50 (Moderator)
Also adding settings UX to change it