mirror of https://github.com/jlelse/GoBlog
Fix
This commit is contained in:
parent
029d4555b2
commit
8a20285029
|
@ -27,10 +27,12 @@ func sendNotification(text string) {
|
||||||
if err := saveNotification(n); err != nil {
|
if err := saveNotification(n); err != nil {
|
||||||
log.Println("Failed to save notification:", err.Error())
|
log.Println("Failed to save notification:", err.Error())
|
||||||
}
|
}
|
||||||
if appConfig.Notifications.Telegram.Enabled {
|
if an := appConfig.Notifications; an != nil {
|
||||||
err := sendTelegramMessage(n.Text, "", appConfig.Notifications.Telegram.BotToken, appConfig.Notifications.Telegram.ChatID)
|
if tg := an.Telegram; tg != nil && tg.Enabled {
|
||||||
if err != nil {
|
err := sendTelegramMessage(n.Text, "", tg.BotToken, tg.ChatID)
|
||||||
log.Println("Failed to send Telegram notification:", err.Error())
|
if err != nil {
|
||||||
|
log.Println("Failed to send Telegram notification:", err.Error())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue