From e35171ab812053411b9a426cc106f3fc2baaedde Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sat, 22 Feb 2025 22:19:50 +0800 Subject: [PATCH] :bug: Try to fix visibility --- pkg/internal/services/posts.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/internal/services/posts.go b/pkg/internal/services/posts.go index 73ea9de..7d3aad1 100644 --- a/pkg/internal/services/posts.go +++ b/pkg/internal/services/posts.go @@ -154,12 +154,11 @@ func FilterPostWithUserContext(c *fiber.Ctx, tx *gorm.DB, user *authm.Account) * } tx = tx.Where( - "publisher_id = ? OR visibility != ? OR "+ + "publisher_id = ? OR "+ "(visibility = ? AND publisher_id IN ?) OR "+ "(visibility = ? AND ?) OR "+ "(visibility = ? AND NOT ?)", user.ID, - NoneVisibility, FriendsVisibility, allowlist, SelectedVisibility,