From 8ac9faec2cb825679f70bd6d2a6aa1624aa863f8 Mon Sep 17 00:00:00 2001 From: Will Brown Date: Sat, 8 Feb 2025 16:37:17 -0500 Subject: [PATCH] [main.c] Add some text for the last published data of empty feeds --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index ba165ec..7194fa4 100644 --- a/main.c +++ b/main.c @@ -258,8 +258,8 @@ static void bot_command_add(struct discord *client, const struct discord_interac } feed.title = mrss_feed->title; - // if there are no entries, set the last pubDate to zero. - feed.last_pubDate = mrss_feed->item ? mrss_feed->item->pubDate : 0; + // if there are no entries, we can't just give it the invalid pointer + feed.last_pubDate = mrss_feed->item ? mrss_feed->item->pubDate : "Never"; zblock_feed_info_err insert_res = zblock_feed_info_insert(database_conn, &feed); if (insert_res) {