don't enable telegram user notifications when they are disabled

Before that change, enabling Telegram auth
also enabled Telegram user notifications.
This commit is contained in:
Dmitry Verkhoturov
2022-07-27 23:21:09 +02:00
parent 86dae37c5d
commit 41d47fdb3e
+2 -1
View File
@@ -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)
}