Skip to content

Commit

Permalink
Merge branch 'release/v1.6.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
axllent committed May 4, 2023
2 parents 34b62bd + 1e8f107 commit c83acfb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions storage/migrationTasks.go
Original file line number Diff line number Diff line change
Expand Up @@ -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`).
Expand Down
4 changes: 2 additions & 2 deletions storage/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
),
)
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit c83acfb

Please sign in to comment.