diff options
author | Tulir Asokan <tulir@maunium.net> | 2019-01-11 23:28:47 +0200 |
---|---|---|
committer | Tulir Asokan <tulir@maunium.net> | 2019-01-11 23:28:47 +0200 |
commit | 331597b9f8a7942cbcb233a328301e4d5bf94fb0 (patch) | |
tree | 5ec624585ebf66c63549a098acb6f7421f1193a7 /ui/commands.go | |
parent | 2fc3378b717f40f37f3a188b68407887242d9c06 (diff) |
Switch to Go modules and make other changes
Diffstat (limited to 'ui/commands.go')
-rw-r--r-- | ui/commands.go | 3 |
1 files changed, 2 insertions, 1 deletions
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, "<font color=\"%s\">%c</font>", 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() } |