Remove spec v1.3 check for threads
Citation: https://matrix.to/#/!ewdjhNcPcEmYNKzlWp:t2l.io/$CkPuvKdFZyFL547JCy5J3MfvLaWUo_a1XEdmiop1PKc?via=matrix.org&via=element.io&via=envs.net
This commit is contained in:
parent
901e397409
commit
c63a5c0201
|
@ -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,9 +62,9 @@ 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
|
||||
|
|
Loading…
Reference in New Issue