diff options
author | Jesse Hallam <jesse.hallam@gmail.com> | 2018-10-18 13:49:10 -0400 |
---|---|---|
committer | Elias Nahum <nahumhbl@gmail.com> | 2018-10-18 14:49:10 -0300 |
commit | d1805733feb8c48a7286eb1affc1f98ed1a044a8 (patch) | |
tree | 9c141e10210e68686173a9f093a383d26792f276 /wsapi | |
parent | a708c33520e327487fd2dc05eaab3563c8161fb7 (diff) | |
download | chat-d1805733feb8c48a7286eb1affc1f98ed1a044a8.tar.gz chat-d1805733feb8c48a7286eb1affc1f98ed1a044a8.tar.bz2 chat-d1805733feb8c48a7286eb1affc1f98ed1a044a8.zip |
MM-12505: remove all things WebRTC (#9700)
Diffstat (limited to 'wsapi')
-rw-r--r-- | wsapi/api.go | 1 | ||||
-rw-r--r-- | wsapi/webrtc.go | 26 |
2 files changed, 0 insertions, 27 deletions
diff --git a/wsapi/api.go b/wsapi/api.go index f318cba6f..988229737 100644 --- a/wsapi/api.go +++ b/wsapi/api.go @@ -21,7 +21,6 @@ func Init(a *app.App, router *app.WebSocketRouter) { api.InitUser() api.InitSystem() api.InitStatus() - api.InitWebrtc() a.HubStart() } diff --git a/wsapi/webrtc.go b/wsapi/webrtc.go deleted file mode 100644 index de50fa06b..000000000 --- a/wsapi/webrtc.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved. -// See License.txt for license information. - -package wsapi - -import ( - "github.com/mattermost/mattermost-server/model" -) - -func (api *API) InitWebrtc() { - api.Router.Handle("webrtc", api.ApiWebSocketHandler(api.webrtcMessage)) -} - -func (api *API) webrtcMessage(req *model.WebSocketRequest) (map[string]interface{}, *model.AppError) { - var ok bool - var toUserId string - if toUserId, ok = req.Data["to_user_id"].(string); !ok || len(toUserId) != 26 { - return nil, NewInvalidWebSocketParamError(req.Action, "to_user_id") - } - - event := model.NewWebSocketEvent(model.WEBSOCKET_EVENT_WEBRTC, "", "", toUserId, nil) - event.Data = req.Data - api.App.Publish(event) - - return nil, nil -} |