chore: Support new unifiedpush gateway discovery
This commit is contained in:
parent
b36fe86dc3
commit
b649d975ab
1 changed files with 3 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue