1
0
mirror of https://github.com/axllent/mailpit.git synced 2025-02-07 13:31:56 +02:00

Feature: Add Message-Id to MessageSummary (#116)

This commit is contained in:
Lars Liedtke 2023-05-30 06:02:25 +02:00 committed by GitHub
parent 086142e977
commit 34c1748f4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -321,7 +321,7 @@ func List(start, limit int) ([]MessageSummary, error) {
results := []MessageSummary{}
q := sqlf.From("mailbox").
Select(`Created, ID, Subject, Metadata, Size, Attachments, Read, Tags`).
Select(`Created, ID, MessageID, Subject, Metadata, Size, Attachments, Read, Tags`).
OrderBy("Created DESC").
Limit(limit).
Offset(start)
@ -329,6 +329,7 @@ func List(start, limit int) ([]MessageSummary, error) {
if err := q.QueryAndClose(nil, db, func(row *sql.Rows) {
var created int64
var id string
var messageID string
var subject string
var metadata string
var size int
@ -354,6 +355,7 @@ func List(start, limit int) ([]MessageSummary, error) {
em.Created = time.UnixMilli(created)
em.ID = id
em.MessageID = messageID
em.Subject = subject
em.Size = size
em.Attachments = attachments

View File

@ -69,6 +69,8 @@ type Attachment struct {
type MessageSummary struct {
// Database ID
ID string
// Message ID
MessageID string
// Read status
Read bool
// From address