mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
MM-12505: remove all things WebRTC (#9700)
This commit is contained in:
committed by
Elias Nahum
parent
a708c33520
commit
d1805733fe
@@ -21,7 +21,6 @@ func Init(a *app.App, router *app.WebSocketRouter) {
|
||||
api.InitUser()
|
||||
api.InitSystem()
|
||||
api.InitStatus()
|
||||
api.InitWebrtc()
|
||||
|
||||
a.HubStart()
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user