Verify push proxy on undefined and properly show error text (#6283)

This commit is contained in:
Daniel Espino García
2022-05-17 16:03:53 +02:00
committed by GitHub
parent 8c3b101d66
commit 1706b673ba
2 changed files with 6 additions and 3 deletions

View File

@@ -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;
}

View File

@@ -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.',
});