telegramnotifier: support broadcast flag

This commit is contained in:
c9s 2021-10-15 18:01:11 +08:00
parent 77e7f814d9
commit 2b17124d06

View File

@ -85,8 +85,15 @@ func (n *Notifier) NotifyTo(channel string, obj interface{}, args ...interface{}
}
if n.broadcast {
n.interaction.Broadcast(message)
for _, text := range texts {
n.interaction.Broadcast(text)
}
} else {
n.interaction.SendToOwner(message)
for _, text := range texts {
n.interaction.SendToOwner(text)
}
}
}