From dc09b7781ac310646014f05db23844ab2c6d63f4 Mon Sep 17 00:00:00 2001 From: Dmitri Aizenberg Date: Wed, 31 Aug 2016 06:24:14 -0700 Subject: PLT-1527 Add a slash command to set yourself away (#3752) * added handlers for slash commands * added manual status persistance * added tests * removed extra debug output and comments * rebase - fixing the PR * making echo messages after slash commands ephemeral --- api/web_conn.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'api/web_conn.go') diff --git a/api/web_conn.go b/api/web_conn.go index 8741873fd..c842e2df1 100644 --- a/api/web_conn.go +++ b/api/web_conn.go @@ -32,7 +32,7 @@ type WebConn struct { } func NewWebConn(c *Context, ws *websocket.Conn) *WebConn { - go SetStatusOnline(c.Session.UserId, c.Session.Id) + go SetStatusOnline(c.Session.UserId, c.Session.Id, false) return &WebConn{ Send: make(chan model.WebSocketMessage, 64), @@ -55,7 +55,7 @@ func (c *WebConn) readPump() { c.WebSocket.SetReadDeadline(time.Now().Add(PONG_WAIT)) c.WebSocket.SetPongHandler(func(string) error { c.WebSocket.SetReadDeadline(time.Now().Add(PONG_WAIT)) - go SetStatusAwayIfNeeded(c.UserId) + go SetStatusAwayIfNeeded(c.UserId, false) return nil }) -- cgit v1.2.3-1-g7c22