Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

Do not show 'No notification channels' banner if Telegram is not set up, but there is at least one other integration

Blue Mousef9fff2e5eacd
diff --git a/app/pages/Project/Alerts/Settings/ProjectAlertsSettings.tsx b/app/pages/Project/Alerts/Settings/ProjectAlertsSettings.tsx
index 1ceae625c..d430eaad3 100644
--- a/app/pages/Project/Alerts/Settings/ProjectAlertsSettings.tsx
+++ b/app/pages/Project/Alerts/Settings/ProjectAlertsSettings.tsx
@@ -74,7 +74,13 @@ const ProjectAlertsSettings = ({
const [showModal, setShowModal] = useState<boolean>(false)
const isIntegrationLinked = useMemo(() => {
- return !_isEmpty(user) && user.telegramChatId && user.isTelegramChatIdConfirmed
+ if (_isEmpty(user)) {
+ return false
+ }
+
+ return Boolean(
+ (user.telegramChatId && user.isTelegramChatIdConfirmed) || user.slackWebhookUrl || user.discordWebhookUrl,
+ )
}, [user])
const queryTimeTMapping: {
@@ -256,7 +262,6 @@ const ProjectAlertsSettings = ({
<div className='mt-2 flex items-center whitespace-pre-wrap rounded bg-blue-50 px-5 py-3 text-base dark:bg-slate-800 dark:text-gray-50'>
<ExclamationTriangleIcon className='mr-1 h-5 w-5' />
<Trans
- // @ts-ignore
t={t}
i18nKey='alert.noIntegration'
components={{
diff --git a/app/pages/Project/Alerts/View/ProjectAlertsView.tsx b/app/pages/Project/Alerts/View/ProjectAlertsView.tsx
index a7459b806..adb7fe96b 100644
--- a/app/pages/Project/Alerts/View/ProjectAlertsView.tsx
+++ b/app/pages/Project/Alerts/View/ProjectAlertsView.tsx
@@ -214,7 +214,13 @@ const ProjectAlerts = ({ projectId }: IProjectAlerts): JSX.Element => {
}, [t])
const isIntegrationLinked = useMemo(() => {
- return !_isEmpty(user) && user.telegramChatId && user.isTelegramChatIdConfirmed
+ if (_isEmpty(user)) {
+ return false
+ }
+
+ return Boolean(
+ (user.telegramChatId && user.isTelegramChatIdConfirmed) || user.slackWebhookUrl || user.discordWebhookUrl,
+ )
}, [user])
const handleNewAlert = () => {