mirror of
https://github.com/mautrix/signal.git
synced 2025-03-14 14:15:36 +00:00
userinfo: don't fetch info in background mode unless necessary
This commit is contained in:
parent
3d5f873cfc
commit
6abb21cfac
1 changed files with 4 additions and 0 deletions
|
@ -46,6 +46,10 @@ func (s *SignalClient) GetUserInfo(ctx context.Context, ghost *bridgev2.Ghost) (
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if ghost.Name != "" && s.Main.Bridge.Background {
|
||||
// Don't do unnecessary fetches in background mode
|
||||
return nil, nil
|
||||
}
|
||||
contact, err := s.Client.ContactByACI(ctx, userID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Add table
Reference in a new issue