diff options
author | Corey Hulen <corey@hulen.com> | 2016-01-20 13:36:27 -0600 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2016-01-20 13:36:27 -0600 |
commit | d703d09063538fb91baa5a21b1001216c43d848a (patch) | |
tree | d87809ff2a306e5428b0ab6973d05509baa21abd /api/web_conn.go | |
parent | 0b1aff3b24b4ac2df8e963c83d6e52b127c603f9 (diff) | |
parent | aefbb541d0d5bdd9919fef44fbf1a1fbfeaeb58b (diff) | |
download | chat-d703d09063538fb91baa5a21b1001216c43d848a.tar.gz chat-d703d09063538fb91baa5a21b1001216c43d848a.tar.bz2 chat-d703d09063538fb91baa5a21b1001216c43d848a.zip |
Merge pull request #1932 from mattermost/revert-1930-PLT-7-server-db
Revert " PLT-7 adding loc for db calls"
Diffstat (limited to 'api/web_conn.go')
-rw-r--r-- | api/web_conn.go | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/api/web_conn.go b/api/web_conn.go index b9c728174..2b0e29038 100644 --- a/api/web_conn.go +++ b/api/web_conn.go @@ -8,7 +8,6 @@ import ( "github.com/gorilla/websocket" "github.com/mattermost/platform/model" "github.com/mattermost/platform/store" - "github.com/mattermost/platform/utils" "time" ) @@ -30,8 +29,8 @@ type WebConn struct { func NewWebConn(ws *websocket.Conn, teamId string, userId string, sessionId string) *WebConn { go func() { - achan := Srv.Store.User().UpdateUserAndSessionActivity(utils.T, userId, sessionId, model.GetMillis()) - pchan := Srv.Store.User().UpdateLastPingAt(utils.T, userId, model.GetMillis()) + achan := Srv.Store.User().UpdateUserAndSessionActivity(userId, sessionId, model.GetMillis()) + pchan := Srv.Store.User().UpdateLastPingAt(userId, model.GetMillis()) if result := <-achan; result.Err != nil { l4g.Error("Failed to update LastActivityAt for user_id=%v and session_id=%v, err=%v", userId, sessionId, result.Err) @@ -56,7 +55,7 @@ func (c *WebConn) readPump() { c.WebSocket.SetReadDeadline(time.Now().Add(PONG_WAIT)) go func() { - if result := <-Srv.Store.User().UpdateLastPingAt(utils.T, c.UserId, model.GetMillis()); result.Err != nil { + if result := <-Srv.Store.User().UpdateLastPingAt(c.UserId, model.GetMillis()); result.Err != nil { l4g.Error("Failed to updated LastPingAt for user_id=%v, err=%v", c.UserId, result.Err) } }() @@ -108,7 +107,7 @@ func (c *WebConn) writePump() { } func (c *WebConn) updateChannelAccessCache(channelId string) bool { - allowed := hasPermissionsToChannel(Srv.Store.Channel().CheckPermissionsTo(utils.T, c.TeamId, channelId, c.UserId)) + allowed := hasPermissionsToChannel(Srv.Store.Channel().CheckPermissionsTo(c.TeamId, channelId, c.UserId)) c.ChannelAccessCache[channelId] = allowed return allowed |