From 7ec518b41cf3177ba91232779a1be1e622817f53 Mon Sep 17 00:00:00 2001 From: Magnus Jensen Date: Wed, 15 Feb 2023 18:20:34 +0100 Subject: [PATCH] update index to use approval date if set (#540) Co-authored-by: MagnusHJensen Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com> --- src/search/indexing/local_import.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/search/indexing/local_import.rs b/src/search/indexing/local_import.rs index ec805c6c..2db614c9 100644 --- a/src/search/indexing/local_import.rs +++ b/src/search/indexing/local_import.rs @@ -79,7 +79,7 @@ pub async fn index_local( downloads: m.downloads, icon_url: m.icon_url.unwrap_or_default(), author: m.username, - date_created: m.published, + date_created: m.approved.unwrap_or(m.published), created_timestamp: m.approved.unwrap_or(m.published).timestamp(), date_modified: m.updated, modified_timestamp: m.updated.timestamp(),