Added guard.
This should be refactored to handle generalized announcements or have some API for collecting all scheduled messages.
This commit is contained in:
parent
fd608a857c
commit
d06ecc76e3
1 changed files with 3 additions and 1 deletions
|
|
@ -161,7 +161,9 @@ func (a *App) daily() {
|
||||||
// I'm somewhat concerned that once the error handling is resolved, this
|
// I'm somewhat concerned that once the error handling is resolved, this
|
||||||
// could get triggered without some guards. Considering checkout
|
// could get triggered without some guards. Considering checkout
|
||||||
// sb.Len() or the total birthdays.
|
// sb.Len() or the total birthdays.
|
||||||
a.bot.SendMarkdownMessage(chat.ID, sb.String())
|
if sb.Len() > 0 {
|
||||||
|
a.bot.SendMarkdownMessage(chat.ID, sb.String())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue