refactor: Update SDK
This commit is contained in:
parent
b55a81e4ef
commit
91f52956f0
26 changed files with 57 additions and 187 deletions
|
|
@ -133,7 +133,7 @@ class BackgroundPush {
|
|||
}
|
||||
final clientName = PlatformInfos.clientName;
|
||||
oldTokens ??= <String>{};
|
||||
final pushers = await client.requestPushers().catchError((e) {
|
||||
final pushers = await client.getPushers().catchError((e) {
|
||||
Logs().w('[Push] Unable to request pushers', e);
|
||||
return <Pusher>[];
|
||||
});
|
||||
|
|
@ -179,7 +179,7 @@ class BackgroundPush {
|
|||
oldTokens.contains(pusher.pushkey)) {
|
||||
pusher.kind = null;
|
||||
try {
|
||||
await client.setPusher(
|
||||
await client.postPusher(
|
||||
pusher,
|
||||
append: true,
|
||||
);
|
||||
|
|
@ -191,7 +191,7 @@ class BackgroundPush {
|
|||
}
|
||||
if (setNewPusher) {
|
||||
try {
|
||||
await client.setPusher(
|
||||
await client.postPusher(
|
||||
Pusher(
|
||||
token,
|
||||
thisAppId,
|
||||
|
|
@ -534,7 +534,7 @@ class BackgroundPush {
|
|||
try {
|
||||
Logs().v(
|
||||
'[Push] failed to sync for fallback push, fetching notifications endpoint...');
|
||||
final notifications = await client.requestNotifications(limit: 20);
|
||||
final notifications = await client.getNotifications(limit: 20);
|
||||
final notificationRooms =
|
||||
notifications.notifications.map((n) => n.roomId).toSet();
|
||||
emptyRooms = client.rooms
|
||||
|
|
|
|||
|
|
@ -45,8 +45,7 @@ class UrlLauncher {
|
|||
// we were unable to find the room locally...so resolve it
|
||||
final response = await showFutureLoadingDialog(
|
||||
context: context,
|
||||
future: () =>
|
||||
matrix.client.requestRoomAliasInformation(roomIdOrAlias),
|
||||
future: () => matrix.client.getRoomIdByAlias(roomIdOrAlias),
|
||||
);
|
||||
if (response.error != null) {
|
||||
return; // nothing to do, the alias doesn't exist
|
||||
|
|
@ -79,7 +78,7 @@ class UrlLauncher {
|
|||
roomId = roomIdOrAlias;
|
||||
final response = await showFutureLoadingDialog(
|
||||
context: context,
|
||||
future: () => matrix.client.joinRoomOrAlias(
|
||||
future: () => matrix.client.joinRoom(
|
||||
roomIdOrAlias,
|
||||
servers: servers.isNotEmpty ? servers.toList() : null,
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue