Update SDK

This commit is contained in:
Sorunome 2020-08-16 12:54:43 +02:00
commit 32a1c3ca1c
31 changed files with 1394 additions and 261 deletions

View file

@ -53,7 +53,7 @@ abstract class FirebaseController {
}
return;
}
final pushers = await client.api.requestPushers();
final pushers = await client.requestPushers();
final currentPushers = pushers.where((pusher) => pusher.pushkey == token);
if (currentPushers.length == 1 &&
currentPushers.first.kind == 'http' &&
@ -69,14 +69,14 @@ abstract class FirebaseController {
for (final currentPusher in currentPushers) {
currentPusher.pushkey = token;
currentPusher.kind = 'null';
await client.api.setPusher(
await client.setPusher(
currentPusher,
append: true,
);
debugPrint('[Push] Remove legacy pusher for this device');
}
}
await client.api.setPusher(
await client.setPusher(
Pusher(
token,
APP_ID,

View file

@ -23,7 +23,7 @@ class UrlLauncher {
final identifier = url.replaceAll('https://matrix.to/#/', '');
if (identifier.substring(0, 1) == '#') {
final response = await SimpleDialogs(context).tryRequestWithLoadingDialog(
matrix.client.api.joinRoom(
matrix.client.joinRoom(
Uri.encodeComponent(identifier),
),
);