diff options
author | JoramWilander <jwawilander@gmail.com> | 2018-06-30 12:24:04 -0400 |
---|---|---|
committer | JoramWilander <jwawilander@gmail.com> | 2018-06-30 12:24:04 -0400 |
commit | 3848cb7e79e019e2f0878d6e2377ad36b3c7ca43 (patch) | |
tree | 98beeb962ffc6d7c3f8cd38651eaccab4a9685fa /app/web_conn.go | |
parent | 88c5e469ca869d9e8ceadb0f2b03e86005102f24 (diff) | |
parent | 2362a5b7f7c2b4bf2b35b104e8616d847b33b0be (diff) | |
download | chat-3848cb7e79e019e2f0878d6e2377ad36b3c7ca43.tar.gz chat-3848cb7e79e019e2f0878d6e2377ad36b3c7ca43.tar.bz2 chat-3848cb7e79e019e2f0878d6e2377ad36b3c7ca43.zip |
Merge branch 'master' into plugins-2
Diffstat (limited to 'app/web_conn.go')
-rw-r--r-- | app/web_conn.go | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/app/web_conn.go b/app/web_conn.go index 9d8134f34..dd01a8e31 100644 --- a/app/web_conn.go +++ b/app/web_conn.go @@ -33,6 +33,7 @@ type WebConn struct { Send chan model.WebSocketMessage sessionToken atomic.Value session atomic.Value + LastUserActivityAt int64 UserId string T goi18n.TranslateFunc Locale string @@ -52,14 +53,15 @@ func (a *App) NewWebConn(ws *websocket.Conn, session model.Session, t goi18n.Tra } wc := &WebConn{ - App: a, - Send: make(chan model.WebSocketMessage, SEND_QUEUE_SIZE), - WebSocket: ws, - UserId: session.UserId, - T: t, - Locale: locale, - endWritePump: make(chan struct{}, 2), - pumpFinished: make(chan struct{}, 1), + App: a, + Send: make(chan model.WebSocketMessage, SEND_QUEUE_SIZE), + WebSocket: ws, + LastUserActivityAt: model.GetMillis(), + UserId: session.UserId, + T: t, + Locale: locale, + endWritePump: make(chan struct{}, 2), + pumpFinished: make(chan struct{}, 1), } wc.SetSession(&session) |