repos / pico

pico services mono repo
git clone https://github.com/picosh/pico.git

commit
fd4594c
parent
cfe2c2b
author
Eric Bower
date
2025-02-05 20:25:31 -0500 EST
fix(feeds): fallback to feed.Link when feed.GUID is empty

Closes: #184
1 files changed,  +6, -1
M feeds/cron.go
+6, -1
 1@@ -454,9 +454,14 @@ func (f *Fetcher) FetchAll(logger *slog.Logger, urls []string, inlineContent boo
 2 	fdi := []*db.FeedItem{}
 3 	for _, feed := range feeds.Feeds {
 4 		for _, item := range feed.FeedItems {
 5+			uid := item.GUID
 6+			// sometimes guid is blank so we need to find another uid
 7+			if uid == "" {
 8+				uid = item.Link
 9+			}
10 			fdi = append(fdi, &db.FeedItem{
11 				PostID: post.ID,
12-				GUID:   item.GUID,
13+				GUID:   uid,
14 				Data: db.FeedItemData{
15 					Title:       item.Title,
16 					Description: item.Description,