fix 'email has been sent' msg type, fixes #48
This commit is contained in:
parent
aba1a6521d
commit
2e712e0a67
1 changed files with 1 additions and 1 deletions
|
|
@ -290,12 +290,12 @@ func (b *Bot) saveSentMetadata(ctx context.Context, queued bool, threadID id.Eve
|
||||||
evt := eventFromContext(ctx)
|
evt := eventFromContext(ctx)
|
||||||
content := email.Content(threadID, cfg.ContentOptions())
|
content := email.Content(threadID, cfg.ContentOptions())
|
||||||
notice := format.RenderMarkdown(text, true, true)
|
notice := format.RenderMarkdown(text, true, true)
|
||||||
notice.MsgType = event.MsgNotice
|
|
||||||
msgContent, ok := content.Parsed.(*event.MessageEventContent)
|
msgContent, ok := content.Parsed.(*event.MessageEventContent)
|
||||||
if !ok {
|
if !ok {
|
||||||
b.Error(ctx, evt.RoomID, "cannot parse message")
|
b.Error(ctx, evt.RoomID, "cannot parse message")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
msgContent.MsgType = event.MsgNotice
|
||||||
msgContent.Body = notice.Body
|
msgContent.Body = notice.Body
|
||||||
msgContent.FormattedBody = notice.FormattedBody
|
msgContent.FormattedBody = notice.FormattedBody
|
||||||
content.Parsed = msgContent
|
content.Parsed = msgContent
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue