Fix extra newline in plaintext body when sending code block. Fixes #216

This commit is contained in:
Tulir Asokan
2020-09-04 18:19:55 +03:00
parent 56256b8937
commit bda603eca7
3 changed files with 4 additions and 3 deletions

View File

@ -440,6 +440,7 @@ func (view *RoomView) SetEditing(evt *muksevt.Event) {
// This feels kind of dangerous, but I think it works
msgContent = view.editing.Gomuks.Edits[len(view.editing.Gomuks.Edits)-1].Content.AsMessage().NewContent
}
// TODO this should parse HTML instead of just using the plaintext body
text := msgContent.Body
if msgContent.MsgType == event.MsgEmote {
text = "/me " + text