Compare commits

..

No commits in common. "ae29a0221c7bb9ecfaada31b585b7570fa6833a5" and "e8184a5a4c522ef2ac2016607fffe0b578252545" have entirely different histories.

2 changed files with 3 additions and 4 deletions

View File

@ -2,7 +2,6 @@ package owl
import ( import (
"bytes" "bytes"
"errors"
"io/ioutil" "io/ioutil"
"net/url" "net/url"
"os" "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 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 errors.New("did not scan. Last scan was less than 7 days ago") return nil
} }
webmention.ScannedAt = time.Now() webmention.ScannedAt = time.Now()

View File

@ -392,8 +392,8 @@ func TestSendWebmentionOnlyScansOncePerWeek(t *testing.T) {
webmention = webmentions[0] webmention = webmentions[0]
err := post.SendWebmention(webmention) err := post.SendWebmention(webmention)
if err == nil { if err != nil {
t.Errorf("Expected error, got nil") t.Errorf("Error sending webmention: %v", err)
} }
webmentions = post.OutgoingWebmentions() webmentions = post.OutgoingWebmentions()