mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
select profile primarily from corresponding session, if exists.
This commit is contained in:
parent
2ff8d84ba2
commit
107eba22a5
@ -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 New Issue
Block a user