Limit author search to registered users only
Only validated (logged-in) users' names are searchable, not seed data authors. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -296,7 +296,7 @@ function filterPosts() {
|
||||
const title = (card.querySelector('h3')?.textContent || '').toLowerCase();
|
||||
const desc = (card.querySelector('p:not(.card-author)')?.textContent || '').toLowerCase();
|
||||
const subLbl = (card.dataset.subcategory || '').toLowerCase();
|
||||
const author = (card.querySelector('.card-author')?.textContent || '').toLowerCase();
|
||||
const author = card.querySelector('.validated-badge') ? (card.querySelector('.card-author')?.textContent || '').toLowerCase() : '';
|
||||
const matchesSearch = !query || title.includes(query) || desc.includes(query) || subLbl.includes(query) || author.includes(query);
|
||||
const postId = card.querySelector('[data-like-id]')?.dataset.likeId || '';
|
||||
const matchesLikes = !APP.showOnlyLiked || APP.userLikes.includes(postId);
|
||||
|
||||
Reference in New Issue
Block a user