Fix comments not shown if all are from us and pending (#2505)

This commit is contained in:
ekzyis 2025-09-22 19:41:27 +02:00 committed by GitHub
parent 53c0f8c277
commit 4df6cfad91
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -54,7 +54,8 @@ function commentsOrderByClause (me, models, sort) {
async function comments (me, models, item, sort, cursor) {
const orderBy = commentsOrderByClause(me, models, sort)
if (item.nDirectComments === 0) {
// if we're logged in, there might be pending comments from us we want to show but weren't counted
if (!me && item.nDirectComments === 0) {
return {
comments: [],
cursor: null
@ -1240,7 +1241,8 @@ export default {
return item.comments
}
if (item.ncomments === 0) {
// if we're logged in, there might be pending comments from us we want to show but weren't counted
if (!me && item.ncomments === 0) {
return {
comments: [],
cursor: null