Merge branch 'krille/override-supported-versions' into 'main'
Krille/override supported versions See merge request famedly/company/frontend/famedlysdk!1047
This commit is contained in:
commit
40c048f9be
|
|
@ -1,3 +1,6 @@
|
||||||
|
## [0.9.10] - 7nd Jun 2022
|
||||||
|
- feat: Allow overriding supportedVersions (Christian Pauly)
|
||||||
|
|
||||||
## [0.9.9] - 2nd Jun 2022
|
## [0.9.9] - 2nd Jun 2022
|
||||||
- fix: Added deprecation mention for getUserByMXIDSync.
|
- fix: Added deprecation mention for getUserByMXIDSync.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -355,8 +355,13 @@ class Client extends MatrixApi {
|
||||||
/// login types. Throws an exception if the server is not compatible with the
|
/// login types. Throws an exception if the server is not compatible with the
|
||||||
/// client and sets [homeserver] to [homeserverUrl] if it is. Supports the
|
/// client and sets [homeserver] to [homeserverUrl] if it is. Supports the
|
||||||
/// types `Uri` and `String`.
|
/// types `Uri` and `String`.
|
||||||
Future<HomeserverSummary> checkHomeserver(Uri homeserverUrl,
|
Future<HomeserverSummary> checkHomeserver(
|
||||||
{bool checkWellKnown = true}) async {
|
Uri homeserverUrl, {
|
||||||
|
bool checkWellKnown = true,
|
||||||
|
Set<String>? overrideSupportedVersions,
|
||||||
|
}) async {
|
||||||
|
final supportedVersions =
|
||||||
|
overrideSupportedVersions ?? Client.supportedVersions;
|
||||||
try {
|
try {
|
||||||
homeserver = homeserverUrl.stripTrailingSlash();
|
homeserver = homeserverUrl.stripTrailingSlash();
|
||||||
|
|
||||||
|
|
@ -376,7 +381,9 @@ class Client extends MatrixApi {
|
||||||
if (!versions.versions
|
if (!versions.versions
|
||||||
.any((version) => supportedVersions.contains(version))) {
|
.any((version) => supportedVersions.contains(version))) {
|
||||||
throw BadServerVersionsException(
|
throw BadServerVersionsException(
|
||||||
versions.versions.toSet(), supportedVersions);
|
versions.versions.toSet(),
|
||||||
|
supportedVersions,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
final loginTypes = await getLoginFlows() ?? [];
|
final loginTypes = await getLoginFlows() ?? [];
|
||||||
|
|
|
||||||
|
|
@ -657,7 +657,7 @@ class Event extends MatrixEvent {
|
||||||
removeMarkdown: removeMarkdown);
|
removeMarkdown: removeMarkdown);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated("Use getLocalizedBodyAsync")
|
@Deprecated('Use getLocalizedBodyAsync')
|
||||||
String getLocalizedBody(MatrixLocalizations i18n,
|
String getLocalizedBody(MatrixLocalizations i18n,
|
||||||
{bool withSenderNamePrefix = false,
|
{bool withSenderNamePrefix = false,
|
||||||
bool hideReply = false,
|
bool hideReply = false,
|
||||||
|
|
|
||||||
|
|
@ -1417,7 +1417,7 @@ class Room {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated(
|
@Deprecated(
|
||||||
"The method was renamed unsafeGetUserFromMemoryOrFallback. Please prefer requestParticipants.")
|
'The method was renamed unsafeGetUserFromMemoryOrFallback. Please prefer requestParticipants.')
|
||||||
User getUserByMXIDSync(String mxID) {
|
User getUserByMXIDSync(String mxID) {
|
||||||
return unsafeGetUserFromMemoryOrFallback(mxID);
|
return unsafeGetUserFromMemoryOrFallback(mxID);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
name: matrix
|
name: matrix
|
||||||
description: Matrix Dart SDK
|
description: Matrix Dart SDK
|
||||||
version: 0.9.9
|
version: 0.9.10
|
||||||
homepage: https://famedly.com
|
homepage: https://famedly.com
|
||||||
repository: https://gitlab.com/famedly/company/frontend/famedlysdk.git
|
repository: https://gitlab.com/famedly/company/frontend/famedlysdk.git
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue