apprise checks at the end if notifying was succesfull
This commit is contained in:
parent
9918a1e683
commit
32900ee652
1 changed files with 5 additions and 1 deletions
|
@ -7,6 +7,7 @@ import (
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
)
|
)
|
||||||
|
@ -85,7 +86,10 @@ func (apprise *AppriseNotifier) Message(message string) bool {
|
||||||
log.Println("Could not parse Apprise response:", err)
|
log.Println("Could not parse Apprise response:", err)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
log.Println(string(body))
|
bdy := string(body)
|
||||||
|
if !strings.Contains(bdy, "Notification(s) sent.") {
|
||||||
|
log.Println("Sending notifications failed:", bdy)
|
||||||
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue