From b649d975abbed867413aac0a0d5b1d9cbe4e2916 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 cb5b00c0b..9d5266c62 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) {