diff --git a/src/Network/GetLatestPostsPerBoardResponse.hs b/src/Network/GetLatestPostsPerBoardResponse.hs index 29f03e3..361432a 100644 --- a/src/Network/GetLatestPostsPerBoardResponse.hs +++ b/src/Network/GetLatestPostsPerBoardResponse.hs @@ -14,7 +14,7 @@ data GetLatestPostsPerBoardResponse = GetLatestPostsPerBoardResponse , pathpart :: String -- , post_id :: Maybe Int64 -- , board_post_id :: Int64 - , creation_time :: UTCTime + , creation_time :: Maybe UTCTime -- , thread_id :: Int64 -- , board_thread_id :: Integer } deriving (Show, Generic, FromJSON) diff --git a/src/Sync.hs b/src/Sync.hs index de5171d..fb88c04 100644 --- a/src/Sync.hs +++ b/src/Sync.hs @@ -174,7 +174,13 @@ syncWebsites csmr_settings = do let board_id_to_last_modified = Map.fromList $ map - (\b -> (GLPPBR.board_id b, GLPPBR.creation_time b)) + ( \b -> + ( GLPPBR.board_id b + -- set t = 0 if there are no posts on the board yet + -- this way it will check all of the threads + , fromMaybe (Lib.epochToUTCTime 0) $ GLPPBR.creation_time b + ) + ) latest_posts_per_board let site_name_to_site :: Map.Map String Site.Site =