Skip to content

Commit

Permalink
feat: Mute 📌 posts by default
Browse files Browse the repository at this point in the history
Fixes #31
  • Loading branch information
gadenbuie committed Jan 18, 2025
1 parent 3dbd6ee commit 2c65e4a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ bluesky-comments:

- `mute-patterns`: An array of strings or regex patterns (enclosed in `/`) to filter out comments containing specific text
- `mute-users`: An array of Bluesky DIDs to filter out comments from specific users
- `filter-empty-replies`: Boolean flag to filter out empty or very short replies (default: `true`)
- `filter-empty-replies`: Boolean flag to filter out empty or very short replies, including bookmarking (📌) replies (default: `true`)
- `n-show-init`: Number of top-level comments to show initially (default: `3`)
- `n-show-more`: Number of replies to reveal when the user clicks on the "Show more" button (default: `2`)

Expand Down
9 changes: 4 additions & 5 deletions _extensions/bluesky-comments/bluesky-comments.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,10 @@ class BlueskyComments extends HTMLElement {
}

// Check empty/spam replies
if (
this.filterConfig.filterEmptyReplies &&
(!text.trim() || text.length < 2)
) {
return true;
if (this.filterConfig.filterEmptyReplies) {
if (!text.trim() || text.length < 2 || text === '📌') {
return true;
}
}

return false;
Expand Down
2 changes: 1 addition & 1 deletion docs/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ bluesky-comments:
- `profile`: A string with the user profile as a handle or [decentralized identifier](faq.qmd#convert-to-atproto-uri)
- `mute-patterns`: An array of strings or regex patterns (enclosed in `/`) to filter out comments containing specific text
- `mute-users`: An array of Bluesky DIDs to filter out comments from specific users
- `filter-empty-replies`: Boolean flag to filter out empty or very short replies (default: `true`)
- `filter-empty-replies`: Boolean flag to filter out empty or very short replies, including bookmarking (📌) replies (default: `true`)
- `n-show-init`: Number of top-level comments to show initially (default: `3`)
- `n-show-more`: Number of replies to reveal when the user clicks on the "Show more" button (default: `2`)

Expand Down

0 comments on commit 2c65e4a

Please sign in to comment.