|
|
@ -17,7 +17,7 @@ const messages = defineMessages({
|
|
|
|
botAPI: 'Bot Authentication Token',
|
|
|
|
botAPI: 'Bot Authentication Token',
|
|
|
|
chatId: 'Chat ID',
|
|
|
|
chatId: 'Chat ID',
|
|
|
|
validationBotAPIRequired: 'You must provide a bot authentication token',
|
|
|
|
validationBotAPIRequired: 'You must provide a bot authentication token',
|
|
|
|
validationChatIdRequired: 'You must provide a valid chat ID',
|
|
|
|
validationChatIdRequired: 'You must provide a chat ID',
|
|
|
|
telegramsettingssaved: 'Telegram notification settings saved successfully!',
|
|
|
|
telegramsettingssaved: 'Telegram notification settings saved successfully!',
|
|
|
|
telegramsettingsfailed: 'Telegram notification settings failed to save.',
|
|
|
|
telegramsettingsfailed: 'Telegram notification settings failed to save.',
|
|
|
|
testsent: 'Test notification sent!',
|
|
|
|
testsent: 'Test notification sent!',
|
|
|
@ -43,9 +43,9 @@ const NotificationsTelegram: React.FC = () => {
|
|
|
|
botAPI: Yup.string().required(
|
|
|
|
botAPI: Yup.string().required(
|
|
|
|
intl.formatMessage(messages.validationBotAPIRequired)
|
|
|
|
intl.formatMessage(messages.validationBotAPIRequired)
|
|
|
|
),
|
|
|
|
),
|
|
|
|
chatId: Yup.string()
|
|
|
|
chatId: Yup.string().required(
|
|
|
|
.required(intl.formatMessage(messages.validationChatIdRequired))
|
|
|
|
intl.formatMessage(messages.validationChatIdRequired)
|
|
|
|
.matches(/^\d+$/, intl.formatMessage(messages.validationChatIdRequired)),
|
|
|
|
),
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
if (!data && !error) {
|
|
|
|
if (!data && !error) {
|
|
|
|