From 1706b673ba0cd57ed3b3869e2ab80e2d25041be3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Espino=20Garc=C3=ADa?= Date: Tue, 17 May 2022 16:03:53 +0200 Subject: [PATCH] Verify push proxy on undefined and properly show error text (#6283) --- app/actions/remote/entry/app.ts | 5 ++++- .../servers/servers_list/server_item/server_item.tsx | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/actions/remote/entry/app.ts b/app/actions/remote/entry/app.ts index 9f4975790c..e96e90aae2 100644 --- a/app/actions/remote/entry/app.ts +++ b/app/actions/remote/entry/app.ts @@ -114,7 +114,10 @@ export async function verifyPushProxy(serverUrl: string) { const {database} = operator; const ppVerification = await getPushVerificationStatus(database); - if (ppVerification !== PUSH_PROXY_STATUS_UNKNOWN) { + if ( + ppVerification !== PUSH_PROXY_STATUS_UNKNOWN && + ppVerification !== '' + ) { return; } diff --git a/app/screens/home/channel_list/servers/servers_list/server_item/server_item.tsx b/app/screens/home/channel_list/servers/servers_list/server_item/server_item.tsx index d82c39cdda..9bc78fd6cc 100644 --- a/app/screens/home/channel_list/servers/servers_list/server_item/server_item.tsx +++ b/app/screens/home/channel_list/servers/servers_list/server_item/server_item.tsx @@ -354,12 +354,12 @@ const ServerItem = ({ let pushAlertText; if (server.lastActiveAt) { if (pushProxyStatus === PUSH_PROXY_STATUS_NOT_AVAILABLE) { - intl.formatMessage({ + pushAlertText = intl.formatMessage({ id: 'server_list.push_proxy_error', defaultMessage: 'Notifications cannot be received from this server because of its configuration. Contact your system admin.', }); } else { - intl.formatMessage({ + pushAlertText = intl.formatMessage({ id: 'server_list.push_proxy_unknown', defaultMessage: 'Notifications could not be received from this server because of its configuration. Log out and Log in again to retry.', });