diff options
Diffstat (limited to 'internal/db/bundb/account.go')
-rw-r--r-- | internal/db/bundb/account.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/db/bundb/account.go b/internal/db/bundb/account.go index e0d574f62..d2c9c2f51 100644 --- a/internal/db/bundb/account.go +++ b/internal/db/bundb/account.go @@ -604,13 +604,16 @@ func (a *accountDB) GetAccountStatuses(ctx context.Context, accountID string, li Where("? = ?", bun.Ident("status.account_id"), accountID) if excludeReplies { - q = q.WhereGroup(" AND ", func(*bun.SelectQuery) *bun.SelectQuery { + q = q.WhereGroup(" AND ", func(q *bun.SelectQuery) *bun.SelectQuery { return q. // Do include self replies (threads), but // don't include replies to other people. Where("? = ?", bun.Ident("status.in_reply_to_account_id"), accountID). WhereOr("? IS NULL", bun.Ident("status.in_reply_to_uri")) }) + // Don't include replies that mention other people: + // for example, an account's reply to its own reply to someone else. + q = whereArrayIsNullOrEmpty(q, bun.Ident("status.mentions")) } if excludeReblogs { |