From d1d129f6cffb909516a29f9bdb0da6f13e65dcaf Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sun, 16 Jun 2019 20:42:13 +0300 Subject: Add support for redactions. Fixes #19 --- ui/messages/parser.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ui/messages/parser.go') diff --git a/ui/messages/parser.go b/ui/messages/parser.go index 29f078c..0b1965e 100644 --- a/ui/messages/parser.go +++ b/ui/messages/parser.go @@ -69,6 +69,9 @@ func directParseEvent(matrix ifc.MatrixContainer, room *rooms.Room, evt *mautrix if member != nil { displayname = member.Displayname } + if evt.Unsigned.RedactedBecause != nil || evt.Type == mautrix.EventRedaction { + return NewRedactedMessage(evt, displayname) + } switch evt.Type { case mautrix.EventSticker: evt.Content.MsgType = mautrix.MsgImage -- cgit v1.2.3