ID in MemberProfile.

This commit is contained in:
Miroslav Šedivý 2020-12-02 19:22:26 +01:00
parent f361d0c681
commit 5f3b9f72cf
2 changed files with 2 additions and 0 deletions

View File

@ -56,6 +56,7 @@ type MemberID struct {
type MemberProfile struct { type MemberProfile struct {
Event string `json:"event,omitempty"` Event string `json:"event,omitempty"`
ID string `json:"id,omitempty"`
Name string `json:"name"` Name string `json:"name"`
IsAdmin bool `json:"is_admin"` IsAdmin bool `json:"is_admin"`
CanLogin bool `json:"can_login"` CanLogin bool `json:"can_login"`

View File

@ -115,6 +115,7 @@ func (h *MessageHandlerCtx) SessionProfileUpdated(session types.Session) error {
h.sessions.Broadcast( h.sessions.Broadcast(
message.MemberProfile{ message.MemberProfile{
Event: event.MEMBER_PROFILE_UPDATED, Event: event.MEMBER_PROFILE_UPDATED,
ID: session.ID(),
Name: session.Name(), Name: session.Name(),
IsAdmin: session.IsAdmin(), IsAdmin: session.IsAdmin(),
CanLogin: session.CanLogin(), CanLogin: session.CanLogin(),