From 9559d27bf6b52cbfb41456e66e1214c322cfd7e0 Mon Sep 17 00:00:00 2001 From: Niko Abeler Date: Sat, 10 Sep 2022 14:22:06 +0200 Subject: [PATCH] did not scan error --- post.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/post.go b/post.go index 70b898f..242ffd7 100644 --- a/post.go +++ b/post.go @@ -2,6 +2,7 @@ package owl import ( "bytes" + "errors" "io/ioutil" "net/url" "os" @@ -308,7 +309,7 @@ func (post *Post) SendWebmention(webmention WebmentionOut) error { // if last scan is less than 7 days ago, don't send webmention if webmention.ScannedAt.After(time.Now().Add(-7*24*time.Hour)) && !webmention.Supported { - return nil + return errors.New("did not scan. Last scan was less than 7 days ago") } webmention.ScannedAt = time.Now()