diff --git a/pkg/internal/services/posts.go b/pkg/internal/services/posts.go index 475f29e..f2d26e3 100644 --- a/pkg/internal/services/posts.go +++ b/pkg/internal/services/posts.go @@ -156,7 +156,7 @@ func FilterPostWithUserContext(tx *gorm.DB, user *authm.Account, withRealm bool) } if !withRealm { if len(realmList) > 0 { - tx = tx.Where("realm_id IN ?", realmList) + tx = tx.Where("realm_id IN ? OR realm_id IS NULL", realmList) } else { tx = tx.Where("realm_id IS NULL") }