From 107eba22a54982b0b378f78709c1840465532990 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Fri, 13 Jan 2023 00:15:19 +0100 Subject: [PATCH] select profile primarily from corresponding session, if exists. --- internal/member/manager.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/member/manager.go b/internal/member/manager.go index 2ba388ea..35386570 100644 --- a/internal/member/manager.go +++ b/internal/member/manager.go @@ -79,6 +79,12 @@ func (manager *MemberManagerCtx) Select(id string) (types.MemberProfile, error) manager.providerMu.Lock() defer manager.providerMu.Unlock() + // get primarily from corresponding session, if exists + session, ok := manager.sessions.Get(id) + if ok { + return session.Profile(), nil + } + return manager.provider.Select(id) }