diff options
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -28,6 +28,7 @@ func processFeed(feed *feed.Feed, cfg *config.Config, client *imap.Client, wg *s } if len(mails) == 0 { + feed.MarkSuccess() return } @@ -43,6 +44,8 @@ func processFeed(feed *feed.Feed, cfg *config.Config, client *imap.Client, wg *s } log.Printf("Uploaded %d messages to '%s' @ %s", len(mails), feed.Name, folder) + + feed.MarkSuccess() } func run() error { @@ -82,6 +85,8 @@ func run() error { return fmt.Errorf("No successfull feed fetch.") } + state.Filter() + imapUrl, err := url.Parse(cfg.Target) if err != nil { return fmt.Errorf("parsing 'target': %w", err) |