mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
member events -> session events.
This commit is contained in:
parent
dafebc79e5
commit
fa687480a9
@ -15,10 +15,10 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
MEMBER_CREATED = "member/created"
|
SESSION_CREATED = "session/created"
|
||||||
MEMBER_DELETED = "member/deleted"
|
SESSION_DELETED = "session/deleted"
|
||||||
MEMBER_PROFILE = "member/profile"
|
SESSION_PROFILE = "session/profile"
|
||||||
MEMBER_STATE = "member/state"
|
SESSION_STATE = "session/state"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -9,7 +9,7 @@ import (
|
|||||||
func (h *MessageHandlerCtx) SessionCreated(session types.Session) error {
|
func (h *MessageHandlerCtx) SessionCreated(session types.Session) error {
|
||||||
h.sessions.Broadcast(
|
h.sessions.Broadcast(
|
||||||
message.MemberData{
|
message.MemberData{
|
||||||
Event: event.MEMBER_CREATED,
|
Event: event.SESSION_CREATED,
|
||||||
ID: session.ID(),
|
ID: session.ID(),
|
||||||
Profile: session.GetProfile(),
|
Profile: session.GetProfile(),
|
||||||
State: session.GetState(),
|
State: session.GetState(),
|
||||||
@ -21,7 +21,7 @@ func (h *MessageHandlerCtx) SessionCreated(session types.Session) error {
|
|||||||
func (h *MessageHandlerCtx) SessionDeleted(session types.Session) error {
|
func (h *MessageHandlerCtx) SessionDeleted(session types.Session) error {
|
||||||
h.sessions.Broadcast(
|
h.sessions.Broadcast(
|
||||||
message.MemberID{
|
message.MemberID{
|
||||||
Event: event.MEMBER_DELETED,
|
Event: event.SESSION_DELETED,
|
||||||
ID: session.ID(),
|
ID: session.ID(),
|
||||||
}, nil)
|
}, nil)
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ func (h *MessageHandlerCtx) SessionProfileChanged(session types.Session) error {
|
|||||||
|
|
||||||
h.sessions.Broadcast(
|
h.sessions.Broadcast(
|
||||||
message.MemberProfile{
|
message.MemberProfile{
|
||||||
Event: event.MEMBER_PROFILE,
|
Event: event.SESSION_PROFILE,
|
||||||
ID: session.ID(),
|
ID: session.ID(),
|
||||||
MemberProfile: &profile,
|
MemberProfile: &profile,
|
||||||
}, nil)
|
}, nil)
|
||||||
@ -70,7 +70,7 @@ func (h *MessageHandlerCtx) SessionStateChanged(session types.Session) error {
|
|||||||
|
|
||||||
h.sessions.Broadcast(
|
h.sessions.Broadcast(
|
||||||
message.SessionState{
|
message.SessionState{
|
||||||
Event: event.MEMBER_STATE,
|
Event: event.SESSION_STATE,
|
||||||
ID: session.ID(),
|
ID: session.ID(),
|
||||||
SessionState: &state,
|
SessionState: &state,
|
||||||
}, nil)
|
}, nil)
|
||||||
|
Loading…
Reference in New Issue
Block a user