diff options
author | Tulir Asokan <tulir@maunium.net> | 2019-04-10 01:04:39 +0300 |
---|---|---|
committer | Tulir Asokan <tulir@maunium.net> | 2019-04-10 01:04:39 +0300 |
commit | bbde1219479bb257c7bc1f9546bd67e8a151198c (patch) | |
tree | 01ae23d19ed4ff44fa218633ae94511778c17ffa /ui/commands.go | |
parent | dbee49476d47bb391dc6af0b774f9fd101b0c917 (diff) |
It compiles. Ship it!
Diffstat (limited to 'ui/commands.go')
-rw-r--r-- | ui/commands.go | 10 |
1 files changed, 3 insertions, 7 deletions
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, "<font color=\"%s\">%c</font>", 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() } |