From ca903d4228265272a0f6a780f5ed2280772eceec Mon Sep 17 00:00:00 2001 From: Tim Culverhouse Date: Mon, 7 Nov 2022 10:15:48 -0600 Subject: envelope: add InReplyTo field A standard IMAP envelope response includes the In-Reply-To header field. Add this field to the aerc model of Envelope. Update envelope parser to set this value. Update imap worker to set this value. Signed-off-by: Tim Culverhouse Tested-by: Inwit Acked-by: Robin Jarry --- models/models.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'models/models.go') diff --git a/models/models.go b/models/models.go index b55024ab..d730229c 100644 --- a/models/models.go +++ b/models/models.go @@ -90,6 +90,9 @@ func (mi *MessageInfo) InReplyTo() (msgid string, err error) { if mi == nil { return "", errors.New("msg is nil") } + if mi.Envelope != nil && mi.Envelope.InReplyTo != "" { + return mi.Envelope.InReplyTo, nil + } if mi.RFC822Headers == nil { return "", errors.New("header is nil") } @@ -200,6 +203,7 @@ type Envelope struct { Cc []*mail.Address Bcc []*mail.Address MessageId string + InReplyTo string } // OriginalMail is helper struct used for reply/forward -- cgit