mirror of
https://github.com/juherr/kill-the-news.git
synced 2026-06-20 22:03:48 +00:00
feat: add sender blocklist with priority matching and quick-add dropdown
- Add `blocked_senders` field to FeedConfig (alongside existing `allowed_senders`) - Refactor sender matching to priority-based logic: exact block > exact allow > domain block > domain allow, enabling exceptions (e.g. allow toto@gmail.com despite blocking gmail.com) - Add `POST /admin/feeds/:feedId/sender-filter` endpoint for quick allow/block from email detail view; returns 409 on conflict with opposite list - Add ⋮ dropdown on From field in email detail with 4 options (allow/block sender/domain), inline success/error feedback - Add blocked_senders textarea to create/edit feed forms - 209 tests passing Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -380,6 +380,22 @@ app.get("/", async (c) => {
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="blocked_senders">
|
||||
Blocked senders (optional, one email or domain per line)
|
||||
</label>
|
||||
<textarea
|
||||
id="blocked_senders"
|
||||
name="blocked_senders"
|
||||
rows={3}
|
||||
placeholder={"spam@example.com\nunwanted.com"}
|
||||
></textarea>
|
||||
<small>
|
||||
Emails from these senders/domains are always rejected, even if
|
||||
they match the allowlist.
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<input type="hidden" id="language" name="language" value="en" />
|
||||
<input type="hidden" name="view" value={view} />
|
||||
|
||||
|
||||
Reference in New Issue
Block a user