From bbde1219479bb257c7bc1f9546bd67e8a151198c Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Wed, 10 Apr 2019 01:04:39 +0300 Subject: It compiles. Ship it! --- ui/commands.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'ui/commands.go') diff --git a/ui/commands.go b/ui/commands.go index a652518..3a24836 100644 --- a/ui/commands.go +++ b/ui/commands.go @@ -27,16 +27,13 @@ import ( "github.com/lucasb-eyer/go-colorful" - "maunium.net/go/mautrix" - "maunium.net/go/mautrix/format" - "maunium.net/go/gomuks/debug" + "maunium.net/go/mautrix" ) func cmdMe(cmd *Command) { text := strings.Join(cmd.Args, " ") - tempMessage := cmd.Room.NewTempMessage("m.emote", text) - go cmd.MainView.sendTempMessage(cmd.Room, tempMessage, text) + go cmd.Room.SendMessage(mautrix.MsgEmote, text) cmd.UI.Render() } @@ -97,8 +94,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", format.HTMLToText(html.String())) - go cmd.MainView.sendTempMessage(cmd.Room, tempMessage, html.String()) + go cmd.Room.SendMessage("m.text", html.String()) cmd.UI.Render() } -- cgit v1.2.3-70-g09d2