From 82988786d427e9d11151a08c4b89291abd593037 Mon Sep 17 00:00:00 2001 From: Dmitry Verkhoturov Date: Wed, 27 Jul 2022 02:25:17 +0200 Subject: [PATCH] don't enable telegram user notifications when they are disabled Before that change, enabling Telegram auth also enabled Telegram user notifications. --- backend/app/cmd/server.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/app/cmd/server.go b/backend/app/cmd/server.go index f17dab26d7..8ed40b20ee 100644 --- a/backend/app/cmd/server.go +++ b/backend/app/cmd/server.go @@ -967,7 +967,8 @@ func (s *ServerCommand) makeNotifyService(dataStore *service.DataStore, destinat if destinations == nil { destinations = []notify.Destination{} } - if telegram != nil { + // it's possible that telegram notification service was created for auth but should not be used for notifications + if telegram != nil && (contains("telegram", s.Notify.Users) || contains("telegram", s.Notify.Admins)) { destinations = append(destinations, telegram) }