mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-05-31 22:58:32 +00:00
shuffle useAccountIDIn check *before* adding to query
This commit is contained in:
parent
05ccf89a4e
commit
0aff0bb196
|
@ -421,16 +421,17 @@ func (a *accountDB) GetAccounts(
|
|||
accountIDIn = append(accountIDIn, user.AccountID)
|
||||
}
|
||||
useAccountIDIn = true
|
||||
} else if origin == "remote" {
|
||||
// Get only remote accounts.
|
||||
q = q.Where("? IS NOT NULL", bun.Ident("account.domain"))
|
||||
|
||||
} else if origin == "remote" {
|
||||
if useAccountIDIn {
|
||||
// useAccountIDIn specifically indicates
|
||||
// a parameter that limits querying to
|
||||
// local accounts, there will be none.
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// Get only remote accounts.
|
||||
q = q.Where("? IS NOT NULL", bun.Ident("account.domain"))
|
||||
}
|
||||
|
||||
if useAccountIDIn {
|
||||
|
|
Loading…
Reference in a new issue