mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Display a msg if no one is on call for a schedule
This commit is contained in:
parent
faa4a915c4
commit
a4a94f2984
@ -61,7 +61,13 @@ func (widget *Widget) contentFrom(onCallResponse *OnCallResponse) string {
|
||||
|
||||
for _, data := range onCallResponse.OnCallData {
|
||||
str = str + fmt.Sprintf(" [green]%s[white]\n", widget.cleanScheduleName(data.Parent.Name))
|
||||
|
||||
if len(data.Recipients) == 0 {
|
||||
str = str + " [gray]no one[white]\n"
|
||||
} else {
|
||||
str = str + fmt.Sprintf(" %s\n", strings.Join(widget.namesFromEmails(data.Recipients), ", "))
|
||||
}
|
||||
|
||||
str = str + "\n"
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user