mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
member name refactor.
This commit is contained in:
parent
c4978ba376
commit
b675e4cc82
@ -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)
|
||||
|
@ -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"`
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user