Skip to content

Commit f287859

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

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
@@ -591,10 +591,10 @@ class Client extends MatrixApi {
591591
final versions = await getVersions();
592592
if (!versions.versions
593593
.any((version) => supportedVersions.contains(version))) {
594-
throw BadServerVersionsException(
595-
versions.versions.toSet(),
596-
supportedVersions,
594+
Logs().w(
595+
'Server supports the versions: ${versions.toString()} but this application is only compatible with ${supportedVersions.toString()}.',
597596
);
597+
assert(false);
598598
}
599599

600600
final loginTypes = await getLoginFlows() ?? [];
@@ -4096,16 +4096,6 @@ enum SyncStatus {
40964096
error,
40974097
}
40984098

4099-
class BadServerVersionsException implements Exception {
4100-
final Set<String> serverVersions, supportedVersions;
4101-
4102-
BadServerVersionsException(this.serverVersions, this.supportedVersions);
4103-
4104-
@override
4105-
String toString() =>
4106-
'Server supports the versions: ${serverVersions.toString()} but this application is only compatible with ${supportedVersions.toString()}.';
4107-
}
4108-
41094099
class BadServerLoginTypesException implements Exception {
41104100
final Set<String> serverLoginTypes, supportedLoginTypes;
41114101

0 commit comments

Comments
 (0)