mirror of
https://github.com/element-hq/element-android
synced 2024-11-23 09:55:40 +03:00
Merge pull request #5997 from vector-im/travis/spec/v1.3-edit/nothreads
Remove spec v1.3 check for threads
This commit is contained in:
commit
019ec6c1c8
3 changed files with 7 additions and 6 deletions
1
changelog.d/5997.misc
Normal file
1
changelog.d/5997.misc
Normal file
|
@ -0,0 +1 @@
|
|||
Update check for server-side threads support to match spec.
|
|
@ -74,8 +74,8 @@ internal fun Versions.isLoginAndRegistrationSupportedBySdk(): Boolean {
|
|||
* Indicate if the homeserver support MSC3440 for threads
|
||||
*/
|
||||
internal fun Versions.doesServerSupportThreads(): Boolean {
|
||||
return getMaxVersion() >= HomeServerVersion.v1_3_0 ||
|
||||
unstableFeatures?.get(FEATURE_THREADS_MSC3440_STABLE) ?: false
|
||||
// TODO: Check for v1.3 or whichever spec version formally specifies MSC3440.
|
||||
return unstableFeatures?.get(FEATURE_THREADS_MSC3440_STABLE) ?: false
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -62,12 +62,12 @@ class VersionsKtTest {
|
|||
Versions(supportedVersions = listOf("r0.6.0")).doesServerSupportThreads() shouldBe false
|
||||
Versions(supportedVersions = listOf("r0.9.1")).doesServerSupportThreads() shouldBe false
|
||||
Versions(supportedVersions = listOf("v1.2.0")).doesServerSupportThreads() shouldBe false
|
||||
Versions(supportedVersions = listOf("v1.3.0")).doesServerSupportThreads() shouldBe true
|
||||
Versions(supportedVersions = listOf("v1.3.1")).doesServerSupportThreads() shouldBe true
|
||||
Versions(supportedVersions = listOf("v1.5.1")).doesServerSupportThreads() shouldBe true
|
||||
Versions(supportedVersions = listOf("v1.3.0")).doesServerSupportThreads() shouldBe false
|
||||
Versions(supportedVersions = listOf("v1.3.1")).doesServerSupportThreads() shouldBe false
|
||||
Versions(supportedVersions = listOf("v1.5.1")).doesServerSupportThreads() shouldBe false
|
||||
Versions(supportedVersions = listOf("r0.6.0"), unstableFeatures = mapOf("org.matrix.msc3440.stable" to true)).doesServerSupportThreads() shouldBe true
|
||||
Versions(supportedVersions = listOf("v1.2.1"), unstableFeatures = mapOf("org.matrix.msc3440.stable" to true)).doesServerSupportThreads() shouldBe true
|
||||
Versions(supportedVersions = listOf("r0.6.0"), unstableFeatures = mapOf("org.matrix.msc3440.stable" to false)).doesServerSupportThreads() shouldBe false
|
||||
Versions(supportedVersions = listOf("v1.4.0"), unstableFeatures = mapOf("org.matrix.msc3440.stable" to false)).doesServerSupportThreads() shouldBe true
|
||||
Versions(supportedVersions = listOf("v1.4.0"), unstableFeatures = mapOf("org.matrix.msc3440.stable" to false)).doesServerSupportThreads() shouldBe false
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue