only restrictable roles get restricted peers views

This commit is contained in:
Pedro Costa
2025-04-29 10:15:24 +01:00
parent 8246dddb07
commit a404bb1ef4

View File

@@ -59,7 +59,7 @@ func (am *DefaultAccountManager) GetPeers(ctx context.Context, accountID, userID
return nil, fmt.Errorf("failed to get account settings: %w", err)
}
if settings.RegularUsersViewBlocked {
if user.IsRestrictable() && settings.RegularUsersViewBlocked {
return []*nbpeer.Peer{}, nil
}