chore: assorted fixes

This commit is contained in:
xuu
2025-04-07 13:11:09 -06:00
parent be614cb67e
commit e54869e4a1
5 changed files with 16 additions and 9 deletions

10
feed.go
View File

@@ -237,7 +237,13 @@ func storeFeed(ctx context.Context, db db, f types.TwtFile) error {
loadTS := time.Now()
refreshRate := 600
feedID := uuid.UrlNS.UUID5(cmp.Or(f.Twter().HashingURI, f.Twter().URI))
feedURI, _ := f.Info().GetN("uri", 0)
feedID := uuid.UrlNS.UUID5(cmp.Or(
feedURI.Value(),
f.Twter().HashingURI,
f.Twter().URI,
))
tx, err := db.BeginTx(ctx, nil)
if err != nil {
@@ -548,8 +554,8 @@ func (n *TwtTime) Scan(value any) error {
n.Time, n.Valid = time.Time{}, false
return nil
case string:
n.Valid = true
n.Time, err = time.Parse(time.RFC3339, value)
n.Valid = err == nil
case time.Time:
n.Valid = true
n.Time = value