From 5f3b9f72cfe7b1a7155736f2a6c986d5a702896d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Wed, 2 Dec 2020 19:22:26 +0100 Subject: [PATCH] ID in MemberProfile. --- internal/types/message/messages.go | 1 + internal/websocket/handler/session.go | 1 + 2 files changed, 2 insertions(+) diff --git a/internal/types/message/messages.go b/internal/types/message/messages.go index 47348377..7a0633de 100644 --- a/internal/types/message/messages.go +++ b/internal/types/message/messages.go @@ -56,6 +56,7 @@ type MemberID struct { type MemberProfile struct { Event string `json:"event,omitempty"` + ID string `json:"id,omitempty"` Name string `json:"name"` IsAdmin bool `json:"is_admin"` CanLogin bool `json:"can_login"` diff --git a/internal/websocket/handler/session.go b/internal/websocket/handler/session.go index a4bb2792..b4e35e36 100644 --- a/internal/websocket/handler/session.go +++ b/internal/websocket/handler/session.go @@ -115,6 +115,7 @@ func (h *MessageHandlerCtx) SessionProfileUpdated(session types.Session) error { h.sessions.Broadcast( message.MemberProfile{ Event: event.MEMBER_PROFILE_UPDATED, + ID: session.ID(), Name: session.Name(), IsAdmin: session.IsAdmin(), CanLogin: session.CanLogin(),