Switch to IMAP UIDs instead of message position numbers

This commit is contained in:
Ian Gulliver
2022-11-13 03:54:57 +00:00
parent 760d7ad081
commit 13a031a2ee
2 changed files with 17 additions and 11 deletions

View File

@@ -43,6 +43,7 @@ func main() {
type Task struct {
Name string
HtmlNotes string
Uid uint32
}
func Poll(ic *ImapClient, ac *AsanaClient) error {
@@ -62,7 +63,12 @@ func Poll(ic *ImapClient, ac *AsanaClient) error {
if err != nil {
return err
}
err = ic.Archive(task)
if err != nil {
return err
}
}
return ic.Archive(len(tasks))
return nil
}