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:
parent
086142e977
commit
34c1748f4b
@ -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
|
||||
|
@ -69,6 +69,8 @@ type Attachment struct {
|
||||
type MessageSummary struct {
|
||||
// Database ID
|
||||
ID string
|
||||
// Message ID
|
||||
MessageID string
|
||||
// Read status
|
||||
Read bool
|
||||
// From address
|
||||
|
Loading…
x
Reference in New Issue
Block a user