diff options
author | René 'Necoro' Neumann <necoro@necoro.eu> | 2020-05-02 21:40:02 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.eu> | 2020-05-02 21:40:02 +0200 |
commit | 1525392a23c86214bf7ad1b5b7d8983f7b30837a (patch) | |
tree | 1515a12a24f682131672acfe3be6c0d17ba9c19b /internal/feed/parse.go | |
parent | 6bd8a6c2cd153bad9ca044b409e55302e10206c1 (diff) | |
download | feed2imap-go-1525392a23c86214bf7ad1b5b7d8983f7b30837a.tar.gz feed2imap-go-1525392a23c86214bf7ad1b5b7d8983f7b30837a.tar.bz2 feed2imap-go-1525392a23c86214bf7ad1b5b7d8983f7b30837a.zip |
Use uuid library directly and encode to base64.
Also add an additional header `X-Feed2Imap-Item`, b/c the messageId contains the variable part of the hostname.
Diffstat (limited to '')
-rw-r--r-- | internal/feed/parse.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/feed/parse.go b/internal/feed/parse.go index dfb447a..1ba90fd 100644 --- a/internal/feed/parse.go +++ b/internal/feed/parse.go @@ -7,7 +7,7 @@ import ( "net/http" "time" - "github.com/lithammer/shortuuid" + "github.com/google/uuid" "github.com/mmcdole/gofeed" "github.com/Necoro/feed2imap-go/pkg/log" @@ -56,7 +56,7 @@ func (feed *Feed) parse() error { feed.feed = parsedFeed feed.items = make([]item, len(parsedFeed.Items)) for idx, feedItem := range parsedFeed.Items { - feed.items[idx] = item{Feed: parsedFeed, Item: feedItem, itemId: shortuuid.New(), feed: feed} + feed.items[idx] = item{Feed: parsedFeed, Item: feedItem, itemId: uuid.New(), feed: feed} } return nil } |