From 3581e6369f064a93f435e57651adedbfac581bdb Mon Sep 17 00:00:00 2001 From: Cameron Pfiffer Date: Thu, 27 Nov 2025 16:04:31 -0800 Subject: [PATCH] Add allowed_handles config to filter which users bot responds to MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When bot.allowed_handles is configured, only mentions from those handles will be processed. Empty list means respond to all (default). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- bsky.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bsky.py b/bsky.py index 02377f9..a2cd55a 100644 --- a/bsky.py +++ b/bsky.py @@ -234,6 +234,12 @@ def process_mention(void_agent, atproto_client, notification_data, queue_filepat 'mention_preview': mention_text[:100] if mention_text else '' }) + # Check if handle is in allowed list (if configured) + allowed_handles = get_config().get('bot.allowed_handles', []) + if allowed_handles and author_handle not in allowed_handles: + logger.info(f"[{correlation_id}] Skipping mention from @{author_handle} (not in allowed_handles)") + return True # Remove from queue + # Retrieve the entire thread associated with the mention try: thread = atproto_client.app.bsky.feed.get_post_thread({ -- 2.51.2