Skip to content

Commit

Permalink
Merge branch 'release/tchap_v2.4.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Renaud committed Aug 29, 2022
2 parents 75e8112 + e5667a4 commit dc462eb
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 42 deletions.
13 changes: 12 additions & 1 deletion TCHAP_CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
Changes in Tchap 2.4.2 (2022-08-29)
===================================

Bugfixes 🐛
----------
- Forum creation: limited to my domain is not working ([#695](https://github.com/tchapgouv/tchap-android-v2/issues/695))


Changes in Tchap 2.4.1 (2022-08-16)
===================================

Expand All @@ -11,12 +19,15 @@ Other changes
- [Menu - Report Bug] Do not select "send screenshot" by default ([#686](https://github.com/tchapgouv/tchap-android-v2/issues/686))
- Remove Android Auto support ([#703](https://github.com/tchapgouv/tchap-android-v2/issues/703))


Changes in Tchap 2.4.0 (2022-08-03)
===================================

Improvements 🙌
--------------
- Using a secondary button style in the case of binary actions ([#668](https://github.com/tchapgouv/tchap-android-v2/issues/668))
- Use a secondary button style in the case of binary actions ([#668](https://github.com/tchapgouv/tchap-android-v2/issues/668))
- [Manage Sessions] Restore the shields in the sessions list ([605](https://github.com/tchapgouv/tchap-android-v2/issues/605))
- Enable cross-signing in Btchap and DevTchap, key backup in DevTchap ([458](https://github.com/tchapgouv/tchap-android-v2/issues/458))

Bugfixes 🐛
----------
Expand Down
1 change: 0 additions & 1 deletion changelog.d/458.improvments

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/605.improvments

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/668.improvments

This file was deleted.

2 changes: 1 addition & 1 deletion towncrier.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.towncrier]
version = "2.4.1"
version = "2.4.2"
directory = "changelog.d"
filename = "TCHAP_CHANGES.md"
name = "Changes in Tchap"
Expand Down
2 changes: 1 addition & 1 deletion vector/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ ext.versionMinor = 4
// Note: even values are reserved for regular release, odd values for hotfix release.
// When creating a hotfix, you should decrease the value, since the current value
// is the value for the next regular release.
ext.versionPatch = 1
ext.versionPatch = 2

static def getGitTimestamp() {
def cmd = 'git show -s --format=%ct'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ class CreateRoomViewModel @AssistedInject constructor(
}

val createRoomParams = CreateRoomParams()
.setTchapParams()
.setTchapParams(state)
.apply {
name = state.roomName.takeIf { it.isNotBlank() }
topic = state.roomTopic.takeIf { it.isNotBlank() }
Expand Down Expand Up @@ -351,39 +351,37 @@ class CreateRoomViewModel @AssistedInject constructor(
}
}

private fun CreateRoomParams.setTchapParams() = apply {
withState { state ->
if (state.roomType == TchapRoomType.FORUM) {
// Directory visibility
visibility = RoomDirectoryVisibility.PUBLIC
// Preset
preset = CreateRoomPreset.PRESET_PUBLIC_CHAT
// In case of a public room, the room alias is mandatory.
// That's why, we deduce the room alias from the room name.
roomAliasName = TchapUtils.createRoomAliasName(state.roomName)
historyVisibility = RoomHistoryVisibility.WORLD_READABLE
} else {
// Directory visibility
visibility = RoomDirectoryVisibility.PRIVATE
// Preset
preset = CreateRoomPreset.PRESET_PRIVATE_CHAT
// Hide the encrypted messages sent before the member is invited.
historyVisibility = RoomHistoryVisibility.INVITED
// Encryption
enableEncryption()
}

if (state.roomType == TchapRoomType.EXTERNAL) {
// Room access rule
setRoomAccessRulesInInitialStates(this, RoomAccessRules.UNRESTRICTED)
} else {
// Room access rule
setRoomAccessRulesInInitialStates(this, RoomAccessRules.RESTRICTED)
}
private fun CreateRoomParams.setTchapParams(state: CreateRoomViewState) = apply {
if (state.roomType == TchapRoomType.FORUM) {
// Directory visibility
visibility = RoomDirectoryVisibility.PUBLIC
// Preset
preset = CreateRoomPreset.PRESET_PUBLIC_CHAT
// In case of a public room, the room alias is mandatory.
// That's why, we deduce the room alias from the room name.
roomAliasName = TchapUtils.createRoomAliasName(state.roomName)
historyVisibility = RoomHistoryVisibility.WORLD_READABLE
} else {
// Directory visibility
visibility = RoomDirectoryVisibility.PRIVATE
// Preset
preset = CreateRoomPreset.PRESET_PRIVATE_CHAT
// Hide the encrypted messages sent before the member is invited.
historyVisibility = RoomHistoryVisibility.INVITED
// Encryption
enableEncryption()
}

// Disabling federation
disableFederation = state.disableFederation
if (state.roomType == TchapRoomType.EXTERNAL) {
// Room access rule
setRoomAccessRulesInInitialStates(this, RoomAccessRules.UNRESTRICTED)
} else {
// Room access rule
setRoomAccessRulesInInitialStates(this, RoomAccessRules.RESTRICTED)
}

// Disabling federation
disableFederation = state.disableFederation
}

/**
Expand Down
4 changes: 2 additions & 2 deletions vector/src/main/res/values-fr/strings_tchap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<string name="tchap_room_extern_room_type">Externes</string>
<string name="tchap_room_forum_type">Forum</string>
<string name="tchap_room_invited_you">%s vous a invité</string>
<string name="tchap_fab_join_public_room">Rejoindre un forum depuis l\'annuaire</string>
<string name="tchap_fab_join_public_room">Rejoindre un forum depuis lannuaire</string>

<!-- tchap scan media -->
<string name="tchap_scan_media_untrusted_content_message">Le document (%s) a été filtré par la politique de sécurité</string>
Expand Down Expand Up @@ -118,4 +118,4 @@

<!-- Verification -->
<string name="tchap_verification_conclusion_not_secure">La vérification de votre nouvelle session a échoué.</string>
</resources>
</resources>
4 changes: 2 additions & 2 deletions vector/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1620,8 +1620,8 @@
<string name="room_preview_no_preview">"This room can't be previewed"</string>
<string name="room_preview_not_found">This room is not accessible at this time.\nTry again later, or ask a room admin to check if you have access.</string>
<string name="room_preview_no_preview_join">"This room can't be previewed. Do you want to join it?"</string>
<string name="fab_menu_create_room">"Rooms"</string>
<string name="fab_menu_create_chat">"Direct Messages"</string>
<string name="fab_menu_create_room">"New room/forum"</string> <!-- Tchap: custom string -->
<string name="fab_menu_create_chat">"New Direct Messages"</string> <!-- Tchap: custom string -->

<!-- Create room screen -->
<string name="create_room_action_create">"CREATE"</string>
Expand Down

0 comments on commit dc462eb

Please sign in to comment.