My List: show owned forums only when not official forums

This commit is contained in:
Noah Petherbridge 2024-08-30 18:49:12 -07:00
parent b034b1ae6c
commit 2c7532434a

View File

@ -140,7 +140,10 @@ func PaginateForums(user *User, categories []string, search *Search, subscribed
WHERE user_id = ?
AND forum_id = forums.id
)
OR forums.owner_id = ?
OR (
forums.owner_id = ?
AND (forums.category = '' OR forums.category IS NULL)
)
`)
placeholders = append(placeholders, user.ID, user.ID)
}