From 9e96135ad665910d16b6d570b33d162bd955fb25 Mon Sep 17 00:00:00 2001 From: Sorunome Date: Sun, 1 Aug 2021 09:55:57 +0200 Subject: [PATCH] chore: Support new unifiedpush gateway discovery --- lib/utils/background_push.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/utils/background_push.dart b/lib/utils/background_push.dart index cb5b00c0..9d5266c6 100644 --- a/lib/utils/background_push.dart +++ b/lib/utils/background_push.dart @@ -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) {