Skip to content

Commit 48bb3b3

Browse files
fix: clean up bad version response
Signed-off-by: The one with the braid <[email protected]>
1 parent d78c4f3 commit 48bb3b3

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

lib/src/client.dart

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -572,10 +572,10 @@ class Client extends MatrixApi {
572572
final versions = await getVersions();
573573
if (!versions.versions
574574
.any((version) => supportedVersions.contains(version))) {
575-
throw BadServerVersionsException(
576-
versions.versions.toSet(),
577-
supportedVersions,
575+
Logs().w(
576+
'Server supports the versions: ${versions.toString()} but this application is only compatible with ${supportedVersions.toString()}.',
578577
);
578+
assert(false);
579579
}
580580

581581
final loginTypes = await getLoginFlows() ?? [];
@@ -4080,16 +4080,6 @@ enum SyncStatus {
40804080
error,
40814081
}
40824082

4083-
class BadServerVersionsException implements Exception {
4084-
final Set<String> serverVersions, supportedVersions;
4085-
4086-
BadServerVersionsException(this.serverVersions, this.supportedVersions);
4087-
4088-
@override
4089-
String toString() =>
4090-
'Server supports the versions: ${serverVersions.toString()} but this application is only compatible with ${supportedVersions.toString()}.';
4091-
}
4092-
40934083
class BadServerLoginTypesException implements Exception {
40944084
final Set<String> serverLoginTypes, supportedLoginTypes;
40954085

0 commit comments

Comments
 (0)