1
0
mirror of https://github.com/nikoksr/notify.git synced 2025-02-09 13:13:44 +02:00

Merge branch 'main' into build/add-basic-ci

This commit is contained in:
Niko Köser 2021-02-07 12:12:21 +01:00 committed by GitHub
commit b7a214b523
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View File

@ -50,7 +50,7 @@ telegramService.AddReceivers("-1234567890")
// Tell our notifier to use the telegram service. You can repeat the above process
// for as many services as you like and just tell the notifier to use them.
// Its kinda like using middlewares for api servers.
notifier.UseService(telegramService)
notifier.UseServices(telegramService)
// Send a test message
_ = notifier.Send(

View File

@ -36,7 +36,7 @@ func main() {
// Tell our notifier to use the Pushbullet service. You can repeat the above process
// for as many services as you like and just tell the notifier to use them.
notifier.UseService(service)
notifier.UseServices(service)
// Send a message
err = notifier.Send(
@ -81,7 +81,7 @@ func main() {
// Tell our notifier to use the Pushbullet service. You can repeat the above process
// for as many services as you like and just tell the notifier to use them.
notifier.UseService(service)
notifier.UseServices(service)
// Send a message
err = notifier.Send(

View File

@ -38,7 +38,7 @@ func main() {
// Tell our notifier to use the Slack service. You can repeat the above process
// for as many services as you like and just tell the notifier to use them.
notifier.UseService(slackService)
notifier.UseServices(slackService)
// Send a message
_ = notifier.Send(

View File

@ -37,7 +37,7 @@ func New(apiToken string) (*Telegram, error) {
func (t *Telegram) AddReceivers(chatIDs ...string) {
for _, v := range chatIDs {
chatID, err := strconv.ParseInt(v, 10, 64)
if err != nil {
if err == nil {
t.chatIDs = append(t.chatIDs, chatID)
}
}