chore: changes to feed

This commit is contained in:
xuu
2025-03-26 18:54:44 -06:00
parent 5c97bfb182
commit b34c9bc99f
2 changed files with 56 additions and 17 deletions
+9 -2
View File
@@ -322,9 +322,16 @@ func storeFeed(ctx context.Context, db db, f types.TwtFile) error {
_, part, ok := strings.Cut(prev.Value(), " ")
if ok {
uri:= f.Twter().URI
if u, ok := f.Info().GetN("url", 0); ok {
uri = u.Value()
}
if u, ok := f.Info().GetN("uri", 0); ok {
uri = u.Value()
}
part = uri[:strings.LastIndex(uri, "/")+1] + part
childID := urlNS.UUID5(part)
fmt.Println("found prev", uri, part)
args = append(args,
childID, // feed_id
feedID, // parent_id
@@ -332,7 +339,7 @@ func storeFeed(ctx context.Context, db db, f types.TwtFile) error {
part, // uri
"once", // state
nil, // last_scan_on
refreshRate, // refresh_rate
0, // refresh_rate
)
}
}