aboutsummaryrefslogtreecommitdiff
path: root/ui/messages
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2020-07-05 17:54:05 +0300
committerTulir Asokan <tulir@maunium.net>2020-07-05 17:54:05 +0300
commitecdd4f08cb262c8f0c988209e6296c068e1d4cf3 (patch)
tree8466e374008c1d1c001e5a49381519a099dda61a /ui/messages
parentdb108d4e6bfced55724bf9d82dc32de3ad7764a2 (diff)
Support edits without m.new_content
Diffstat (limited to 'ui/messages')
-rw-r--r--ui/messages/parser.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/messages/parser.go b/ui/messages/parser.go
index 4e87d1f..349794d 100644
--- a/ui/messages/parser.go
+++ b/ui/messages/parser.go
@@ -196,7 +196,10 @@ func ParseMessage(matrix ifc.MatrixContainer, room *rooms.Room, evt *muksevt.Eve
content.RemoveReplyFallback()
}
if len(evt.Gomuks.Edits) > 0 {
- content = evt.Gomuks.Edits[len(evt.Gomuks.Edits)-1].Content.AsMessage().NewContent
+ newContent := evt.Gomuks.Edits[len(evt.Gomuks.Edits)-1].Content.AsMessage().NewContent
+ if newContent != nil {
+ content = newContent
+ }
}
switch content.MsgType {
case event.MsgText, event.MsgNotice, event.MsgEmote: