🎨 List file/asset history following the limit of editor history retention days https://github.com/siyuan-note/siyuan/issues/9723

This commit is contained in:
Daniel 2023-11-22 21:51:59 +08:00
parent 7cbf14a42f
commit e0d0c5c4d5
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -394,6 +394,9 @@ func buildSearchHistoryQueryFilter(query, op, box, table string, typ int) (stmt
} else if HistoryTypeAsset == typ {
stmt += " AND path LIKE '%/assets/%'"
}
ago := time.Now().Add(-24 * time.Hour * time.Duration(Conf.Editor.HistoryRetentionDays))
stmt += " AND created > '" + fmt.Sprintf("%d", ago.Unix()) + "'"
return
}