2
0
mirror of https://gitlab.com/famedly/fluffychat.git synced 2025-05-31 03:57:36 +02:00

Merge branch 'soru/up-update' into 'main'

chore: Support new unifiedpush gateway discovery

Closes 

See merge request 
This commit is contained in:
Krille Fear 2021-08-01 13:06:18 +00:00
commit 79673ed757

@ -346,7 +346,9 @@ class BackgroundPush {
.first;
final res =
json.decode(utf8.decode((await http.get(Uri.parse(url))).bodyBytes));
if (res['gateway'] == 'matrix') {
if (res['gateway'] == 'matrix' ||
(res['unifiedpush'] is Map &&
res['unifiedpush']['gateway'] == 'matrix')) {
endpoint = url;
}
} catch (e) {