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
|
||||
- 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
|
||||
/// client and sets [homeserver] to [homeserverUrl] if it is. Supports the
|
||||
/// types `Uri` and `String`.
|
||||
Future<HomeserverSummary> checkHomeserver(Uri homeserverUrl,
|
||||
{bool checkWellKnown = true}) async {
|
||||
Future<HomeserverSummary> checkHomeserver(
|
||||
Uri homeserverUrl, {
|
||||
bool checkWellKnown = true,
|
||||
Set<String>? overrideSupportedVersions,
|
||||
}) async {
|
||||
final supportedVersions =
|
||||
overrideSupportedVersions ?? Client.supportedVersions;
|
||||
try {
|
||||
homeserver = homeserverUrl.stripTrailingSlash();
|
||||
|
||||
|
|
@ -376,7 +381,9 @@ class Client extends MatrixApi {
|
|||
if (!versions.versions
|
||||
.any((version) => supportedVersions.contains(version))) {
|
||||
throw BadServerVersionsException(
|
||||
versions.versions.toSet(), supportedVersions);
|
||||
versions.versions.toSet(),
|
||||
supportedVersions,
|
||||
);
|
||||
}
|
||||
|
||||
final loginTypes = await getLoginFlows() ?? [];
|
||||
|
|
|
|||
|
|
@ -657,7 +657,7 @@ class Event extends MatrixEvent {
|
|||
removeMarkdown: removeMarkdown);
|
||||
}
|
||||
|
||||
@Deprecated("Use getLocalizedBodyAsync")
|
||||
@Deprecated('Use getLocalizedBodyAsync')
|
||||
String getLocalizedBody(MatrixLocalizations i18n,
|
||||
{bool withSenderNamePrefix = false,
|
||||
bool hideReply = false,
|
||||
|
|
|
|||
|
|
@ -1417,7 +1417,7 @@ class Room {
|
|||
}
|
||||
|
||||
@Deprecated(
|
||||
"The method was renamed unsafeGetUserFromMemoryOrFallback. Please prefer requestParticipants.")
|
||||
'The method was renamed unsafeGetUserFromMemoryOrFallback. Please prefer requestParticipants.')
|
||||
User getUserByMXIDSync(String mxID) {
|
||||
return unsafeGetUserFromMemoryOrFallback(mxID);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
name: matrix
|
||||
description: Matrix Dart SDK
|
||||
version: 0.9.9
|
||||
version: 0.9.10
|
||||
homepage: https://famedly.com
|
||||
repository: https://gitlab.com/famedly/company/frontend/famedlysdk.git
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue