did not scan error
This commit is contained in:
parent
e8184a5a4c
commit
9559d27bf6
3
post.go
3
post.go
|
@ -2,6 +2,7 @@ package owl
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
"errors"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/url"
|
"net/url"
|
||||||
"os"
|
"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 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 {
|
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()
|
webmention.ScannedAt = time.Now()
|
||||||
|
|
Loading…
Reference in New Issue