summaryrefslogtreecommitdiffstats
path: root/api/user.go
diff options
context:
space:
mode:
Diffstat (limited to 'api/user.go')
-rw-r--r--api/user.go25
1 files changed, 0 insertions, 25 deletions
diff --git a/api/user.go b/api/user.go
index 1a9380368..f5bed17ca 100644
--- a/api/user.go
+++ b/api/user.go
@@ -71,8 +71,6 @@ func InitUser() {
BaseRoutes.Root.Handle("/login/sso/saml", AppHandlerIndependent(loginWithSaml)).Methods("GET")
BaseRoutes.Root.Handle("/login/sso/saml", AppHandlerIndependent(completeSaml)).Methods("POST")
-
- app.Srv.WebSocketRouter.Handle("user_typing", ApiWebSocketHandler(userTyping))
}
func createUser(c *Context, w http.ResponseWriter, r *http.Request) {
@@ -1442,29 +1440,6 @@ func completeSaml(c *Context, w http.ResponseWriter, r *http.Request) {
}
}
-func userTyping(req *model.WebSocketRequest) (map[string]interface{}, *model.AppError) {
- var ok bool
- var channelId string
- if channelId, ok = req.Data["channel_id"].(string); !ok || len(channelId) != 26 {
- return nil, NewInvalidWebSocketParamError(req.Action, "channel_id")
- }
-
- var parentId string
- if parentId, ok = req.Data["parent_id"].(string); !ok {
- parentId = ""
- }
-
- omitUsers := make(map[string]bool, 1)
- omitUsers[req.Session.UserId] = true
-
- event := model.NewWebSocketEvent(model.WEBSOCKET_EVENT_TYPING, "", channelId, "", omitUsers)
- event.Add("parent_id", parentId)
- event.Add("user_id", req.Session.UserId)
- go app.Publish(event)
-
- return nil, nil
-}
-
func sanitizeProfile(c *Context, user *model.User) *model.User {
options := utils.Cfg.GetSanitizeOptions()