chore: Support new unifiedpush gateway discovery

This commit is contained in:
Sorunome 2021-08-01 09:55:57 +02:00
parent 5962f386f6
commit 9e96135ad6
No known key found for this signature in database
GPG Key ID: B19471D07FC9BE9C

View File

@ -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) {