mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-24 13:09:24 +01:00
fix: Push on conduit
This commit is contained in:
parent
038a1df161
commit
e5cd14447b
@ -53,7 +53,10 @@ abstract class FirebaseController {
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final pushers = await client.requestPushers();
|
final pushers = await client.requestPushers().catchError((e) {
|
||||||
|
debugPrint('[Push] Unable to request pushers: ${e.toString()}');
|
||||||
|
return [];
|
||||||
|
});
|
||||||
final currentPushers = pushers.where((pusher) => pusher.pushkey == token);
|
final currentPushers = pushers.where((pusher) => pusher.pushkey == token);
|
||||||
if (currentPushers.length == 1 &&
|
if (currentPushers.length == 1 &&
|
||||||
currentPushers.first.kind == 'http' &&
|
currentPushers.first.kind == 'http' &&
|
||||||
@ -76,7 +79,8 @@ abstract class FirebaseController {
|
|||||||
debugPrint('[Push] Remove legacy pusher for this device');
|
debugPrint('[Push] Remove legacy pusher for this device');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await client.setPusher(
|
await client
|
||||||
|
.setPusher(
|
||||||
Pusher(
|
Pusher(
|
||||||
token,
|
token,
|
||||||
APP_ID,
|
APP_ID,
|
||||||
@ -90,7 +94,11 @@ abstract class FirebaseController {
|
|||||||
kind: 'http',
|
kind: 'http',
|
||||||
),
|
),
|
||||||
append: false,
|
append: false,
|
||||||
);
|
)
|
||||||
|
.catchError((e) {
|
||||||
|
debugPrint('[Push] Unable to set pushers: ${e.toString()}');
|
||||||
|
return [];
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Function goToRoom = (dynamic message) async {
|
Function goToRoom = (dynamic message) async {
|
||||||
|
Loading…
Reference in New Issue
Block a user