use correct list of recipients on thread reply and in 'email has been sent' messages

This commit is contained in:
Aine
2022-11-20 00:58:51 +02:00
parent bb7cf4aa7a
commit 117736dcf3
4 changed files with 23 additions and 11 deletions

View File

@@ -129,6 +129,11 @@ func (e *Email) Content(threadID id.EventID, options *ContentOptions) *event.Con
parsed := format.RenderMarkdown(text.String(), true, true)
parsed.RelatesTo = utils.RelatesTo(options.Threads, threadID)
var cc string
if len(e.CC) > 0 {
cc = strings.Join(e.CC, ", ")
}
content := event.Content{
Raw: map[string]interface{}{
options.MessageIDKey: e.MessageID,
@@ -138,7 +143,7 @@ func (e *Email) Content(threadID id.EventID, options *ContentOptions) *event.Con
options.RcptToKey: e.RcptTo,
options.FromKey: e.From,
options.ToKey: e.To,
options.CcKey: e.CC,
options.CcKey: cc,
},
Parsed: &parsed,
}