1
0
mirror of https://github.com/axllent/mailpit.git synced 2025-03-17 21:18:19 +02:00

Merge branch 'release/v1.6.7'

This commit is contained in:
Ralph Slooten 2023-05-05 06:59:09 +12:00
commit c83acfb255
3 changed files with 11 additions and 5 deletions

View File

@ -2,6 +2,12 @@
Notable changes to Mailpit will be documented in this file.
## [v1.6.7]
### Bugfix
- Fix auto-deletion cron
## [v1.6.6]
### API

View File

@ -16,13 +16,13 @@ import (
)
func dataMigrations() {
updateSortByCreatedTask()
updateOrderByCreatedTask()
assignMessageIDsTask()
}
// Update Sort column using Created datetime <= v1.6.5
// Update Created column using Created metadata datetime <= v1.6.5
// Migration task implemented 05/2023 - can be removed end 2023
func updateSortByCreatedTask() {
func updateOrderByCreatedTask() {
q := sqlf.From("mailbox").
Select("ID").
Select(`json_extract(Metadata, '$.Created') as Created`).

View File

@ -39,7 +39,7 @@ func createSearchText(env *enmime.Envelope) string {
b.WriteString(env.GetHeader("Bcc") + " ")
h := strings.TrimSpace(
html2text.HTML2TextWithOptions(
env.HTML,
env.HTML,
html2text.WithLinksInnerText(),
),
)
@ -92,7 +92,7 @@ func dbCron() {
if config.MaxMessages > 0 {
q := sqlf.Select("ID").
From("mailbox").
OrderBy("Sort DESC").
OrderBy("Created DESC").
Limit(5000).
Offset(config.MaxMessages)