summaryrefslogtreecommitdiff
path: root/internal/db/bundb/account.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2021-08-26 11:28:16 +0200
committerLibravatar GitHub <noreply@github.com>2021-08-26 11:28:16 +0200
commitddc120d5e6e0f18f235a6b5bbe5ceec86efedc41 (patch)
tree08869fd4514e7ba67c57e81e001df0e1c329414c /internal/db/bundb/account.go
parentPg to bun (#148) (diff)
downloadgotosocial-ddc120d5e6e0f18f235a6b5bbe5ceec86efedc41.tar.xz
fix public timeline bug (#150)
Diffstat (limited to 'internal/db/bundb/account.go')
-rw-r--r--internal/db/bundb/account.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/db/bundb/account.go b/internal/db/bundb/account.go
index 7ebb79a15..c96d0df9e 100644
--- a/internal/db/bundb/account.go
+++ b/internal/db/bundb/account.go
@@ -110,7 +110,7 @@ func (a *accountDB) GetInstanceAccount(ctx context.Context, domain string) (*gts
} else {
q = q.
Where("account.username = ?", domain).
- Where("? IS NULL", bun.Ident("domain"))
+ WhereGroup(" AND ", whereEmptyOrNull("domain"))
}
err := processErrorResponse(q.Scan(ctx))
@@ -172,7 +172,7 @@ func (a *accountDB) GetLocalAccountByUsername(ctx context.Context, username stri
q := a.newAccountQ(account).
Where("username = ?", username).
- Where("? IS NULL", bun.Ident("domain"))
+ WhereGroup(" AND ", whereEmptyOrNull("domain"))
err := processErrorResponse(q.Scan(ctx))
@@ -218,7 +218,7 @@ func (a *accountDB) GetAccountStatuses(ctx context.Context, accountID string, li
}
if excludeReplies {
- q = q.Where("? IS NULL", bun.Ident("in_reply_to_id"))
+ q = q.WhereGroup(" AND ", whereEmptyOrNull("in_reply_to_id"))
}
if pinnedOnly {