aboutsummaryrefslogtreecommitdiff
path: root/matrix/matrix.go
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2018-04-18 18:35:24 +0300
committerTulir Asokan <tulir@maunium.net>2018-04-18 18:35:54 +0300
commitb17ff318c26aecdcf2c6719ed5b0872be5254c44 (patch)
tree43f5f9aa3ce300c15376860727ff13d3716f3751 /matrix/matrix.go
parent3b2d5fa0349bf01217f6954813c669680cdd16d4 (diff)
Disconnect UI from main Gomuks struct. Fixes #21
Diffstat (limited to 'matrix/matrix.go')
-rw-r--r--matrix/matrix.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/matrix/matrix.go b/matrix/matrix.go
index a2e3767..a38b439 100644
--- a/matrix/matrix.go
+++ b/matrix/matrix.go
@@ -196,7 +196,7 @@ func (c *Container) OnLogin() {
// Start moves the UI to the main view, calls OnLogin() and runs the syncer forever until stopped with Stop()
func (c *Container) Start() {
- defer c.gmx.Recover()
+ defer debug.Recover()
c.ui.SetView(ifc.ViewMain)
c.OnLogin()
@@ -317,7 +317,7 @@ func (c *Container) HandleTyping(evt *gomatrix.Event) {
// SendMessage sends a message with the given text to the given room.
func (c *Container) SendMessage(roomID, msgtype, text string) (string, error) {
- defer c.gmx.Recover()
+ defer debug.Recover()
c.SendTyping(roomID, false)
resp, err := c.client.SendMessageEvent(roomID, "m.room.message",
gomatrix.TextMessage{MsgType: msgtype, Body: text})
@@ -328,7 +328,7 @@ func (c *Container) SendMessage(roomID, msgtype, text string) (string, error) {
}
func (c *Container) SendMarkdownMessage(roomID, msgtype, text string) (string, error) {
- defer c.gmx.Recover()
+ defer debug.Recover()
html := string(blackfriday.Run([]byte(text)))
if html == text {
@@ -351,7 +351,7 @@ func (c *Container) SendMarkdownMessage(roomID, msgtype, text string) (string, e
// SendTyping sets whether or not the user is typing in the given room.
func (c *Container) SendTyping(roomID string, typing bool) {
- defer c.gmx.Recover()
+ defer debug.Recover()
ts := time.Now().Unix()
if c.typing > ts && typing {
return