member name refactor.

This commit is contained in:
Miroslav Šedivý 2020-11-28 15:03:38 +01:00
parent c4978ba376
commit b675e4cc82
4 changed files with 2 additions and 9 deletions

View File

@ -43,10 +43,6 @@ func (session *SessionCtx) Connected() bool {
return session.websocket_connected && session.webrtc_connected
}
func (session *SessionCtx) SetName(name string) {
session.profile.Name = name
}
func (session *SessionCtx) SetWebSocketPeer(websocket_peer types.WebSocketPeer) {
session.websocket_peer = websocket_peer
session.manager.emmiter.Emit("created", session)

View File

@ -23,7 +23,6 @@ type SignalProvide struct {
type SignalAnswer struct {
Event string `json:"event"`
Name string `json:"displayname"` // TODO: Change.
SDP string `json:"sdp"`
}
@ -34,14 +33,14 @@ type MembersList struct {
type MembersListEntry struct {
ID string `json:"id"`
Name string `json:"displayname"` // TODO: Change.
Name string `json:"name"`
Admin bool `json:"admin"`
}
type Member struct {
Event string `json:"event"`
ID string `json:"id"`
Name string `json:"displayname"` // TODO: Change.
Name string `json:"name"`
Admin bool `json:"admin"`
}

View File

@ -20,7 +20,6 @@ type Session interface {
IsHost() bool
Connected() bool
VerifySecret(secret string) bool
SetName(name string)
SetWebSocketPeer(websocket_peer WebSocketPeer)
SetWebSocketConnected(connected bool)
SetWebRTCPeer(webrtc_peer WebRTCPeer)

View File

@ -23,6 +23,5 @@ func (h *MessageHandlerCtx) signalProvide(session types.Session) error {
}
func (h *MessageHandlerCtx) signalAnswer(session types.Session, payload *message.SignalAnswer) error {
session.SetName(payload.Name)
return session.SignalAnswer(payload.SDP)
}