mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
replace old Member structures.
This commit is contained in:
parent
6599a093c0
commit
b82fbae597
@ -48,13 +48,11 @@ type SignalAnswer struct {
|
|||||||
// Member
|
// Member
|
||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
|
|
||||||
// TODO: New.
|
|
||||||
type MemberID struct {
|
type MemberID struct {
|
||||||
Event string `json:"event,omitempty"`
|
Event string `json:"event,omitempty"`
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: New.
|
|
||||||
type MemberData struct {
|
type MemberData struct {
|
||||||
Event string `json:"event,omitempty"`
|
Event string `json:"event,omitempty"`
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
@ -137,17 +135,3 @@ type BroadcastStatus struct {
|
|||||||
IsActive bool `json:"is_active"`
|
IsActive bool `json:"is_active"`
|
||||||
URL string `json:"url,omitempty"`
|
URL string `json:"url,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Remove.
|
|
||||||
type Member struct {
|
|
||||||
Event string `json:"event"`
|
|
||||||
ID string `json:"id"`
|
|
||||||
Name string `json:"name"`
|
|
||||||
Admin bool `json:"admin"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: Remove.
|
|
||||||
type MemberDisconnected struct {
|
|
||||||
Event string `json:"event"`
|
|
||||||
ID string `json:"id"`
|
|
||||||
}
|
|
||||||
|
@ -19,11 +19,11 @@ func (h *MessageHandlerCtx) SessionConnected(session types.Session) error {
|
|||||||
|
|
||||||
// let everyone know there is a new session
|
// let everyone know there is a new session
|
||||||
h.sessions.Broadcast(
|
h.sessions.Broadcast(
|
||||||
message.Member{
|
message.MemberData{
|
||||||
Event: event.MEMBER_CONNECTED,
|
Event: event.MEMBER_CONNECTED,
|
||||||
ID: session.ID(),
|
ID: session.ID(),
|
||||||
Name: session.Name(),
|
Name: session.Name(),
|
||||||
Admin: session.Admin(),
|
IsAdmin: session.Admin(),
|
||||||
}, nil)
|
}, nil)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
@ -43,7 +43,7 @@ func (h *MessageHandlerCtx) SessionDisconnected(session types.Session) error {
|
|||||||
|
|
||||||
// let everyone know session disconnected
|
// let everyone know session disconnected
|
||||||
h.sessions.Broadcast(
|
h.sessions.Broadcast(
|
||||||
message.MemberDisconnected{
|
message.MemberID{
|
||||||
Event: event.MEMBER_DISCONNECTED,
|
Event: event.MEMBER_DISCONNECTED,
|
||||||
ID: session.ID(),
|
ID: session.ID(),
|
||||||
}, nil);
|
}, nil);
|
||||||
|
Loading…
Reference in New Issue
Block a user