diff options
author | Joram Wilander <jwawilander@gmail.com> | 2016-07-18 11:10:03 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-18 11:10:03 -0400 |
commit | c0ab2636d699c8544ce03a58f61b95cfd66ff7ce (patch) | |
tree | c7d07934e0ff1a75aafb097a184ae150888199c0 /api/general.go | |
parent | 180adc79af3d14de6ce62f6e687a6735db3fe82f (diff) | |
download | chat-c0ab2636d699c8544ce03a58f61b95cfd66ff7ce.tar.gz chat-c0ab2636d699c8544ce03a58f61b95cfd66ff7ce.tar.bz2 chat-c0ab2636d699c8544ce03a58f61b95cfd66ff7ce.zip |
PLT-2241 Refactored statuses into a more real-time system (#3573)
* Refactored statuses into a more real-time system
* Updated package.json with correct commit and fixed minor bug
* Minor updates to statuses based on feedback
* When setting status online, update only LastActivityAt if status already exists
Diffstat (limited to 'api/general.go')
-rw-r--r-- | api/general.go | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/api/general.go b/api/general.go index 4124d2e95..233484e43 100644 --- a/api/general.go +++ b/api/general.go @@ -73,7 +73,12 @@ func ping(c *Context, w http.ResponseWriter, r *http.Request) { w.Write([]byte(model.MapToJson(m))) } -func webSocketPing(req *model.WebSocketRequest, responseData map[string]interface{}) *model.AppError { - responseData["text"] = "pong" - return nil +func webSocketPing(req *model.WebSocketRequest) (map[string]interface{}, *model.AppError) { + data := map[string]interface{}{} + data["text"] = "pong" + data["version"] = model.CurrentVersion + data["server_time"] = model.GetMillis() + data["node_id"] = "" + + return data, nil } |