Skip to content

Commit

Permalink
chore(kemono): Clean up created and updated dates
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Jul 11, 2024
1 parent 1889eab commit 1fbfd51
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions internal/kemono/creator.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,9 @@ func (c *Creator) Feed(ctx context.Context, pages uint64, tag, query string) (*f
}
item := post.FeedItem()
f.Items = append(f.Items, item)
if f.Updated.IsZero() {
if !item.Updated.IsZero() {
f.Updated = item.Updated
} else if !item.Created.IsZero() {
f.Updated = item.Created
}
if f.Created.IsZero() && f.Updated.IsZero() {
f.Created = item.Created
f.Updated = item.Updated
}
}

Expand Down

0 comments on commit 1fbfd51

Please sign in to comment.