fix 'email has been sent' msg type, fixes #48
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user