WS remove connected & disconnected event.

This commit is contained in:
Miroslav Šedivý 2020-12-03 16:42:27 +01:00
parent d7b5bd6842
commit 7eee6debc7
2 changed files with 2 additions and 16 deletions

View File

@ -15,8 +15,6 @@ const (
const (
MEMBER_CREATED = "member/created"
MEMBER_DELETED = "member/deleted"
MEMBER_CONNECTED = "member/connected"
MEMBER_DISCONNECTED = "member/disconnected"
MEMBER_PROFILE = "member/profile"
MEMBER_STATE = "member/state"
)

View File

@ -56,13 +56,7 @@ func (h *MessageHandlerCtx) SessionConnected(session types.Session) error {
}
}
h.sessions.Broadcast(
message.MemberID{
Event: event.MEMBER_CONNECTED,
ID: session.ID(),
}, nil);
return nil
return h.SessionStateChanged(session)
}
func (h *MessageHandlerCtx) SessionDisconnected(session types.Session) error {
@ -83,13 +77,7 @@ func (h *MessageHandlerCtx) SessionDisconnected(session types.Session) error {
}, nil)
}
h.sessions.Broadcast(
message.MemberID{
Event: event.MEMBER_DISCONNECTED,
ID: session.ID(),
}, nil);
return nil
return h.SessionStateChanged(session)
}
func (h *MessageHandlerCtx) SessionProfileChanged(session types.Session) error {