forked from Ivasoft/mattermost-mobile
Verify push proxy on undefined and properly show error text (#6283)
This commit is contained in:
committed by
GitHub
parent
8c3b101d66
commit
1706b673ba
@@ -114,7 +114,10 @@ export async function verifyPushProxy(serverUrl: string) {
|
|||||||
const {database} = operator;
|
const {database} = operator;
|
||||||
|
|
||||||
const ppVerification = await getPushVerificationStatus(database);
|
const ppVerification = await getPushVerificationStatus(database);
|
||||||
if (ppVerification !== PUSH_PROXY_STATUS_UNKNOWN) {
|
if (
|
||||||
|
ppVerification !== PUSH_PROXY_STATUS_UNKNOWN &&
|
||||||
|
ppVerification !== ''
|
||||||
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -354,12 +354,12 @@ const ServerItem = ({
|
|||||||
let pushAlertText;
|
let pushAlertText;
|
||||||
if (server.lastActiveAt) {
|
if (server.lastActiveAt) {
|
||||||
if (pushProxyStatus === PUSH_PROXY_STATUS_NOT_AVAILABLE) {
|
if (pushProxyStatus === PUSH_PROXY_STATUS_NOT_AVAILABLE) {
|
||||||
intl.formatMessage({
|
pushAlertText = intl.formatMessage({
|
||||||
id: 'server_list.push_proxy_error',
|
id: 'server_list.push_proxy_error',
|
||||||
defaultMessage: 'Notifications cannot be received from this server because of its configuration. Contact your system admin.',
|
defaultMessage: 'Notifications cannot be received from this server because of its configuration. Contact your system admin.',
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
intl.formatMessage({
|
pushAlertText = intl.formatMessage({
|
||||||
id: 'server_list.push_proxy_unknown',
|
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.',
|
defaultMessage: 'Notifications could not be received from this server because of its configuration. Log out and Log in again to retry.',
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user