notification if telegram server is not reachable
parent
a8fa795be4
commit
0ff022d42e
|
@ -440,6 +440,9 @@
|
|||
"verificationPopover": {
|
||||
"title": "Verification",
|
||||
"description": "Add the bot on your telegram account and send the command {{command}} to the bot"
|
||||
},
|
||||
"connectionFailedPopover": {
|
||||
"title": "Failed to get telegram verify status"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -299,7 +299,8 @@ export default function UserProfile({ userSession, setUserSession }) {
|
|||
{},
|
||||
myFetchContentType.JSON,
|
||||
Constants.TELEGRAM_BOT_MANAGER_ADDRESS
|
||||
).then((data) => {
|
||||
)
|
||||
.then((data) => {
|
||||
// manual check verify status by clicking reload icon
|
||||
if (!updateOnlyOnVerified) {
|
||||
setTelegramNotificationSubscribedStatus(data.Status);
|
||||
|
@ -311,7 +312,13 @@ export default function UserProfile({ userSession, setUserSession }) {
|
|||
clearInterval(statusInterval.current);
|
||||
telegramVerifyCodeRequestTime.current = null;
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() =>
|
||||
notificationApi["error"]({
|
||||
message: t("userProfile.telegram.connectionFailedPopover.title"),
|
||||
description: t("common.contactAdmin"),
|
||||
})
|
||||
);
|
||||
|
||||
const TelegramNotificationSubscribedStatusItem = () => {
|
||||
// check verified status
|
||||
|
|
|
@ -1449,7 +1449,6 @@ export function myFetch(
|
|||
return response.text();
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error("myFetch error:", error);
|
||||
throw error;
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue