diff --git a/client/src/Hooks/useNotificationForm.ts b/client/src/Hooks/useNotificationForm.ts index b48d021da..9b3d44b26 100644 --- a/client/src/Hooks/useNotificationForm.ts +++ b/client/src/Hooks/useNotificationForm.ts @@ -27,7 +27,10 @@ export const useNotificationForm = ({ data = null }: UseNotificationFormOptions }; } else { defaults = { - type: (data?.type || "email") as Exclude, + type: (data?.type || "email") as Exclude< + Notification["type"], + "matrix" | "telegram" + >, notificationName: data?.notificationName || "", address: data?.address || "", }; diff --git a/client/src/Pages/Notifications/create/index.tsx b/client/src/Pages/Notifications/create/index.tsx index 4c5aab1d1..8538f5798 100644 --- a/client/src/Pages/Notifications/create/index.tsx +++ b/client/src/Pages/Notifications/create/index.tsx @@ -186,7 +186,9 @@ const NotificationsCreatePage = () => { {...field} type="text" fieldLabel={t("pages.notifications.form.telegram.optionBotToken")} - placeholder={t("pages.notifications.form.telegram.placeholderBotToken")} + placeholder={t( + "pages.notifications.form.telegram.placeholderBotToken" + )} fullWidth error={!!fieldState.error} helperText={fieldState.error?.message ?? ""} diff --git a/server/src/service/infrastructure/notificationProviders/telegram.ts b/server/src/service/infrastructure/notificationProviders/telegram.ts index cd55fd78f..9cb5aae59 100644 --- a/server/src/service/infrastructure/notificationProviders/telegram.ts +++ b/server/src/service/infrastructure/notificationProviders/telegram.ts @@ -35,7 +35,7 @@ export class TelegramProvider implements INotificationProvider { service: SERVICE_NAME, method: "sendTestAlert", stack: errStack, - error: errMsg, + details: { error: errMsg }, }); return false; } @@ -70,7 +70,7 @@ export class TelegramProvider implements INotificationProvider { service: SERVICE_NAME, method: "sendMessage", stack: errStack, - error: errMsg, + details: { error: errMsg }, }); return false; }