Compare commits
No commits in common. "ae29a0221c7bb9ecfaada31b585b7570fa6833a5" and "e8184a5a4c522ef2ac2016607fffe0b578252545" have entirely different histories.
ae29a0221c
...
e8184a5a4c
3
post.go
3
post.go
|
@ -2,7 +2,6 @@ package owl
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"io/ioutil"
|
||||
"net/url"
|
||||
"os"
|
||||
|
@ -309,7 +308,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 errors.New("did not scan. Last scan was less than 7 days ago")
|
||||
return nil
|
||||
}
|
||||
|
||||
webmention.ScannedAt = time.Now()
|
||||
|
|
|
@ -392,8 +392,8 @@ func TestSendWebmentionOnlyScansOncePerWeek(t *testing.T) {
|
|||
webmention = webmentions[0]
|
||||
|
||||
err := post.SendWebmention(webmention)
|
||||
if err == nil {
|
||||
t.Errorf("Expected error, got nil")
|
||||
if err != nil {
|
||||
t.Errorf("Error sending webmention: %v", err)
|
||||
}
|
||||
|
||||
webmentions = post.OutgoingWebmentions()
|
||||
|
|
Loading…
Reference in New Issue