select profile primarily from corresponding session, if exists.
This commit is contained in:
parent
2ff8d84ba2
commit
107eba22a5
1 changed files with 6 additions and 0 deletions
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue