diff options
author | Tim Culverhouse <tim@timculverhouse.com> | 2022-11-07 10:15:48 -0600 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-11-09 21:26:34 +0100 |
commit | ca903d4228265272a0f6a780f5ed2280772eceec (patch) | |
tree | 6c50f6c5c0171ca80e655d47446272cddbffd9ee /models/models.go | |
parent | e0d279d6128a22db56326557883ad790544bc4f7 (diff) | |
download | aerc-ca903d4228265272a0f6a780f5ed2280772eceec.tar.gz |
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 <tim@timculverhouse.com>
Tested-by: Inwit <inwit@sindominio.net>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'models/models.go')
-rw-r--r-- | models/models.go | 4 |
1 files changed, 4 insertions, 0 deletions
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 |