did not scan error

This commit is contained in:
Niko Abeler 2022-09-10 14:22:06 +02:00
parent e8184a5a4c
commit 9559d27bf6
1 changed files with 2 additions and 1 deletions

View File

@ -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()