mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-11-22 01:05:53 +03:00
[bugfix] post counters should not include direct messages #3504
The fix is relativly simple, it just adds a line to the relevant function which excludes all private posts.
This commit is contained in:
parent
ffa67ac1ae
commit
b3bf853409
1 changed files with 4 additions and 0 deletions
|
@ -103,7 +103,11 @@ func (i *instanceDB) CountInstanceStatuses(ctx context.Context, domain string) (
|
|||
// Ignore statuses that are currently pending approval.
|
||||
q = q.Where("NOT ? = ?", bun.Ident("status.pending_approval"), true)
|
||||
|
||||
// Ignore statuses that are direct messages.
|
||||
q = q.Where("NOT ? = ?", bun.Ident("status.visibility"), "direct")
|
||||
|
||||
count, err := q.Count(ctx)
|
||||
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue