diff options
author | Dmitri Aizenberg <dmitri.aiz@gmail.com> | 2016-08-31 06:24:14 -0700 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2016-08-31 09:24:14 -0400 |
commit | dc09b7781ac310646014f05db23844ab2c6d63f4 (patch) | |
tree | 906f13501b8e30be3551fa18078429445e5ee094 /api/web_conn.go | |
parent | db660bdf9cbea09197d8292a8ec8efda8ac41f38 (diff) | |
download | chat-dc09b7781ac310646014f05db23844ab2c6d63f4.tar.gz chat-dc09b7781ac310646014f05db23844ab2c6d63f4.tar.bz2 chat-dc09b7781ac310646014f05db23844ab2c6d63f4.zip |
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
Diffstat (limited to 'api/web_conn.go')
-rw-r--r-- | api/web_conn.go | 4 |
1 files changed, 2 insertions, 2 deletions
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 }) |