aboutsummaryrefslogtreecommitdiff
path: root/matrix
diff options
context:
space:
mode:
Diffstat (limited to 'matrix')
-rw-r--r--matrix/matrix.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/matrix/matrix.go b/matrix/matrix.go
index 7652188..564dc81 100644
--- a/matrix/matrix.go
+++ b/matrix/matrix.go
@@ -198,13 +198,13 @@ func (c *Container) HandleTyping(evt *gomatrix.Event) {
}
func (c *Container) SendMessage(roomID, message string) {
- c.gmx.Recover()
+ defer c.gmx.Recover()
c.SendTyping(roomID, false)
c.client.SendText(roomID, message)
}
func (c *Container) SendTyping(roomID string, typing bool) {
- c.gmx.Recover()
+ defer c.gmx.Recover()
ts := time.Now().Unix()
if c.typing > ts && typing {
return