aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/messages/parser.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/messages/parser.go b/ui/messages/parser.go
index 80bfa40..94c657b 100644
--- a/ui/messages/parser.go
+++ b/ui/messages/parser.go
@@ -81,8 +81,10 @@ func directParseEvent(matrix ifc.MatrixContainer, room *rooms.Room, evt *muksevt
content.MsgType = event.MsgImage
}
return ParseMessage(matrix, room, evt, displayname)
- case *event.EncryptedEventContent:
- return NewExpandedTextMessage(evt, displayname, tstring.NewStyleTString("Decryption failed or gomuks not built with encryption support", tcell.StyleDefault.Italic(true)))
+ case *muksevt.BadEncryptedContent:
+ return NewExpandedTextMessage(evt, displayname, tstring.NewStyleTString(content.Reason, tcell.StyleDefault.Italic(true)))
+ case *muksevt.EncryptionUnsupportedContent:
+ return NewExpandedTextMessage(evt, displayname, tstring.NewStyleTString("gomuks not built with encryption support", tcell.StyleDefault.Italic(true)))
case *event.TopicEventContent, *event.RoomNameEventContent, *event.CanonicalAliasEventContent:
return ParseStateEvent(evt, displayname)
case *event.MemberEventContent: