aboutsummaryrefslogtreecommitdiff
path: root/ui/messages/parser
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2018-04-19 11:35:52 +0300
committerTulir Asokan <tulir@maunium.net>2018-04-19 11:35:52 +0300
commitc3386ba118b1a0f2ae1a31a9787ea5cb8b68396f (patch)
treed5209da741b7774db0cc173640981846d9f1436f /ui/messages/parser
parentf62b27f332a90000bbbec88634be03418241a9a0 (diff)
Fix golint issues
Diffstat (limited to 'ui/messages/parser')
-rw-r--r--ui/messages/parser/parser.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/ui/messages/parser/parser.go b/ui/messages/parser/parser.go
index 9c833f5..b114d98 100644
--- a/ui/messages/parser/parser.go
+++ b/ui/messages/parser/parser.go
@@ -62,10 +62,9 @@ func ParseMessage(matrix ifc.MatrixContainer, room *rooms.Room, evt *gomatrix.Ev
if hasFormat && format == "org.matrix.custom.html" {
text := ParseHTMLMessage(room, evt, displayname)
return messages.NewExpandedTextMessage(evt.ID, evt.Sender, displayname, msgtype, text, ts)
- } else {
- text, _ := evt.Content["body"].(string)
- return messages.NewTextMessage(evt.ID, evt.Sender, displayname, msgtype, text, ts)
}
+ text, _ := evt.Content["body"].(string)
+ return messages.NewTextMessage(evt.ID, evt.Sender, displayname, msgtype, text, ts)
case "m.image":
url, _ := evt.Content["url"].(string)
data, hs, id, err := matrix.Download(url)