From 331597b9f8a7942cbcb233a328301e4d5bf94fb0 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Fri, 11 Jan 2019 23:28:47 +0200 Subject: Switch to Go modules and make other changes --- ui/commands.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ui/commands.go') diff --git a/ui/commands.go b/ui/commands.go index 0feda29..50aedd2 100644 --- a/ui/commands.go +++ b/ui/commands.go @@ -20,6 +20,7 @@ import ( "encoding/json" "fmt" "maunium.net/go/mautrix" + "maunium.net/go/mautrix/format" "strings" "unicode" @@ -79,7 +80,7 @@ func cmdRainbow(cmd *Command) { color := rainbow.GetInterpolatedColorFor(float64(i) / float64(len(text))).Hex() fmt.Fprintf(&html, "%c", color, char) } - tempMessage := cmd.Room.NewTempMessage("m.text", html.String()) + tempMessage := cmd.Room.NewTempMessage("m.text", format.HTMLToText(html.String())) go cmd.MainView.sendTempMessage(cmd.Room, tempMessage, html.String()) cmd.UI.Render() } -- cgit v1.2.3