Skip to content

Commit aa365d2

Browse files
committed
Merge branch 'release/25.05.1'
2 parents 9b4b107 + 5e39d90 commit aa365d2

File tree

25 files changed

+173
-16
lines changed

25 files changed

+173
-16
lines changed

CHANGES.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,52 @@
1+
Changes in Element X v25.05.0
2+
=============================
3+
4+
## What's Changed
5+
### ✨ Features
6+
* Feature : Report room by @ganfra in https://github.com/element-hq/element-x-android/pull/4654
7+
### 🙌 Improvements
8+
* Render kick and ban reason in the timeline when available by @bmarty in https://github.com/element-hq/element-x-android/pull/4642
9+
### 🐛 Bugfixes
10+
* Accessibility: improve behavior of list items by @bmarty in https://github.com/element-hq/element-x-android/pull/4626
11+
* Render caller avatar on Incoming call screen by @bmarty in https://github.com/element-hq/element-x-android/pull/4635
12+
* Fix `Client.getJoinedRoom` crash when a room doesn't exist locally by @jmartinesp in https://github.com/element-hq/element-x-android/pull/4656
13+
* Fix wrong member count in join room screen for invitation by @bmarty in https://github.com/element-hq/element-x-android/pull/4651
14+
* Make sure any `JoinedRustRoom` is destroyed after being used by @jmartinesp in https://github.com/element-hq/element-x-android/pull/4678
15+
* Fix read receipt behavior when the timeline is opened. by @bmarty in https://github.com/element-hq/element-x-android/pull/4679
16+
### 🗣 Translations
17+
* Sync Strings by @ElementBot in https://github.com/element-hq/element-x-android/pull/4648
18+
* Sync Strings by @ElementBot in https://github.com/element-hq/element-x-android/pull/4677
19+
### 🧱 Build
20+
* OIDC configuration by @bmarty in https://github.com/element-hq/element-x-android/pull/4623
21+
* Pin commit sha on GitHub actions by @bmarty in https://github.com/element-hq/element-x-android/pull/4653
22+
### Dependency upgrades
23+
* fix(deps): update dependency io.sentry:sentry-android to v8.9.0 by @renovate in https://github.com/element-hq/element-x-android/pull/4624
24+
* fix(deps): update dependency com.posthog:posthog-android to v3.14.1 by @renovate in https://github.com/element-hq/element-x-android/pull/4628
25+
* fix(deps): update dependency androidx.exifinterface:exifinterface to v1.4.1 by @renovate in https://github.com/element-hq/element-x-android/pull/4632
26+
* fix(deps): update dependencyanalysis to v2.17.0 by @renovate in https://github.com/element-hq/element-x-android/pull/4638
27+
* fix(deps): update dependency com.google.firebase:firebase-bom to v33.13.0 - autoclosed by @renovate in https://github.com/element-hq/element-x-android/pull/4637
28+
* fix(deps): update dependency io.sentry:sentry-android to v8.10.0 by @renovate in https://github.com/element-hq/element-x-android/pull/4644
29+
* fix(deps): update dependency org.jsoup:jsoup to v1.20.1 by @renovate in https://github.com/element-hq/element-x-android/pull/4655
30+
* fix(deps): update dependency com.google.accompanist:accompanist-permissions to v0.37.3 by @renovate in https://github.com/element-hq/element-x-android/pull/4649
31+
* fix(deps): update dependency io.sentry:sentry-android to v8.11.0 by @renovate in https://github.com/element-hq/element-x-android/pull/4660
32+
* fix(deps): update dependency io.mockk:mockk to v1.14.2 by @renovate in https://github.com/element-hq/element-x-android/pull/4658
33+
* fix(deps): update dependency io.github.sergio-sastre.composablepreviewscanner:android to v0.6.1 by @renovate in https://github.com/element-hq/element-x-android/pull/4647
34+
* fix(deps): update dependency org.matrix.rustcomponents:sdk-android to v25.4.30 by @renovate in https://github.com/element-hq/element-x-android/pull/4665
35+
* fix(deps): update kotlin to v2.1.20-2.0.1 by @renovate in https://github.com/element-hq/element-x-android/pull/4670
36+
* fix(deps): update dependency io.sentry:sentry-android to v8.11.1 by @renovate in https://github.com/element-hq/element-x-android/pull/4668
37+
* fix(deps): update dependency io.element.android:element-call-embedded to v0.10.0 by @renovate in https://github.com/element-hq/element-x-android/pull/4667
38+
* chore(deps): update rnkdsh/action-upload-diawi action to v1.5.9 by @renovate in https://github.com/element-hq/element-x-android/pull/4674
39+
* fix(deps): update dependency org.maplibre.gl:android-sdk to v11.8.7 by @renovate in https://github.com/element-hq/element-x-android/pull/4673
40+
* fix(deps): update dependency org.matrix.rustcomponents:sdk-android to v25.5.6 by @renovate in https://github.com/element-hq/element-x-android/pull/4681
41+
### Others
42+
* Split `MatrixRoom` into `MatrixRoom` and `JoinedMatrixRoom` by @jmartinesp in https://github.com/element-hq/element-x-android/pull/4561
43+
* Cleanup element call and UI by @bmarty in https://github.com/element-hq/element-x-android/pull/4641
44+
* Take change of screen_change_server_error_no_sliding_sync_message into account by @bmarty in https://github.com/element-hq/element-x-android/pull/4650
45+
* Improve the callback uri format and customization. by @bmarty in https://github.com/element-hq/element-x-android/pull/4664
46+
47+
48+
**Full Changelog**: https://github.com/element-hq/element-x-android/compare/v25.04.3...v25.05.0
49+
150
Changes in Element X v25.04.3
251
=============================
352

enterprise

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Main changes in this version: fix Element Call not working.
2+
Full changelog: https://github.com/element-hq/element-x-android/releases

features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils/DefaultCallWidgetProvider.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ class DefaultCallWidgetProvider @Inject constructor(
4848
).getOrThrow()
4949

5050
val driver = room.getWidgetDriver(widgetSettings).getOrThrow()
51-
room.destroy()
5251

5352
CallWidgetProvider.GetWidgetResult(
5453
driver = driver,

features/enterprise/api/src/main/kotlin/io/element/android/features/enterprise/api/EnterpriseService.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ interface EnterpriseService {
1414
val isEnterpriseBuild: Boolean
1515
suspend fun isEnterpriseUser(sessionId: SessionId): Boolean
1616
fun defaultHomeserver(): String?
17+
suspend fun isAllowedToConnectToHomeserver(homeserverUrl: String): Boolean
1718

1819
fun semanticColorsLight(): SemanticColors
1920
fun semanticColorsDark(): SemanticColors

features/enterprise/impl/src/main/kotlin/io/element/android/features/enterprise/impl/DefaultEnterpriseService.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class DefaultEnterpriseService @Inject constructor() : EnterpriseService {
2323
override suspend fun isEnterpriseUser(sessionId: SessionId) = false
2424

2525
override fun defaultHomeserver() = null
26+
override suspend fun isAllowedToConnectToHomeserver(homeserverUrl: String) = true
2627

2728
override fun semanticColorsLight(): SemanticColors = compoundColorsLight
2829

features/enterprise/impl/src/test/kotlin/io/element/android/features/enterprise/impl/DefaultEnterpriseServiceTest.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
package io.element.android.features.enterprise.impl
99

1010
import com.google.common.truth.Truth.assertThat
11+
import io.element.android.libraries.matrix.test.A_HOMESERVER_URL
1112
import io.element.android.libraries.matrix.test.A_SESSION_ID
1213
import kotlinx.coroutines.test.runTest
1314
import org.junit.Test
@@ -25,6 +26,12 @@ class DefaultEnterpriseServiceTest {
2526
assertThat<String?>(defaultEnterpriseService.defaultHomeserver()).isNull()
2627
}
2728

29+
@Test
30+
fun `isAllowedToConnectToHomeserver is true for all homeserver urls`() = runTest {
31+
val defaultEnterpriseService = DefaultEnterpriseService()
32+
assertThat(defaultEnterpriseService.isAllowedToConnectToHomeserver(A_HOMESERVER_URL)).isTrue()
33+
}
34+
2835
@Test
2936
fun `isEnterpriseUser always return false`() = runTest {
3037
val defaultEnterpriseService = DefaultEnterpriseService()

features/enterprise/test/src/main/kotlin/io/element/android/features/enterprise/test/FakeEnterpriseService.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class FakeEnterpriseService(
1717
override val isEnterpriseBuild: Boolean = false,
1818
private val isEnterpriseUserResult: (SessionId) -> Boolean = { lambdaError() },
1919
private val defaultHomeserverResult: () -> String? = { A_FAKE_HOMESERVER },
20+
private val isAllowedToConnectToHomeserverResult: (String) -> Boolean = { lambdaError() },
2021
private val semanticColorsLightResult: () -> SemanticColors = { lambdaError() },
2122
private val semanticColorsDarkResult: () -> SemanticColors = { lambdaError() },
2223
private val firebasePushGatewayResult: () -> String? = { lambdaError() },
@@ -30,6 +31,10 @@ class FakeEnterpriseService(
3031
return defaultHomeserverResult()
3132
}
3233

34+
override suspend fun isAllowedToConnectToHomeserver(homeserverUrl: String): Boolean = simulateLongTask {
35+
isAllowedToConnectToHomeserverResult(homeserverUrl)
36+
}
37+
3338
override fun semanticColorsLight(): SemanticColors {
3439
return semanticColorsLightResult()
3540
}

features/location/api/src/main/kotlin/io/element/android/features/location/api/internal/ModifierCenterBottomEdge.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ import androidx.compose.ui.unit.IntOffset
1515
* Horizontally aligns the content to the center of the space.
1616
* Vertically aligns the bottom edge of the content to the center of the space.
1717
*/
18-
fun Modifier.centerBottomEdge(scope: BoxScope): Modifier = with(scope) {
19-
then(
18+
fun Modifier.centerBottomEdge(scope: BoxScope): Modifier = this.then(
19+
with(scope) {
2020
Modifier.align { size, space, _ ->
2121
IntOffset(
2222
x = (space.width - size.width) / 2,
2323
y = space.height / 2 - size.height,
2424
)
2525
}
26-
)
27-
}
26+
}
27+
)

features/login/impl/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerPresenter.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import androidx.compose.runtime.MutableState
1212
import androidx.compose.runtime.mutableStateOf
1313
import androidx.compose.runtime.remember
1414
import androidx.compose.runtime.rememberCoroutineScope
15+
import io.element.android.features.enterprise.api.EnterpriseService
1516
import io.element.android.features.login.impl.accountprovider.AccountProvider
1617
import io.element.android.features.login.impl.accountprovider.AccountProviderDataSource
1718
import io.element.android.features.login.impl.error.ChangeServerError
@@ -26,6 +27,7 @@ import javax.inject.Inject
2627
class ChangeServerPresenter @Inject constructor(
2728
private val authenticationService: MatrixAuthenticationService,
2829
private val accountProviderDataSource: AccountProviderDataSource,
30+
private val enterpriseService: EnterpriseService,
2931
) : Presenter<ChangeServerState> {
3032
@Composable
3133
override fun present(): ChangeServerState {
@@ -53,6 +55,9 @@ class ChangeServerPresenter @Inject constructor(
5355
changeServerAction: MutableState<AsyncData<Unit>>,
5456
) = launch {
5557
suspend {
58+
if (enterpriseService.isAllowedToConnectToHomeserver(data.url).not()) {
59+
throw UnauthorizedAccountProviderException(data)
60+
}
5661
authenticationService.setHomeserver(data.url).map {
5762
authenticationService.getHomeserverDetails().value!!
5863
// Valid, remember user choice

0 commit comments

Comments
 (0)