fix exception on notify if hostname not set

This commit is contained in:
Roland Osborne 2023-05-19 15:48:25 -07:00
parent c9d0dca5b0
commit c33047f60c

View File

@ -141,7 +141,7 @@ func sendRemoteNotification(notification *store.Notification) {
if err != nil {
ErrMsg(err)
}
if resp.StatusCode != 200 {
if resp == nil || resp.StatusCode != 200 {
LogMsg("failed to notify contact")
}
}