From cf234b0beb06df517dc1695ce2d0d84576cbef98 Mon Sep 17 00:00:00 2001 From: Steve Dudenhoeffer Date: Fri, 23 Jan 2026 01:41:06 -0500 Subject: [PATCH] Fix one-off mode to use pull_statuses truthbrush doesn't have pull_status method, so fetch user's statuses and search for the matching post ID instead. Co-Authored-By: Claude Opus 4.5 --- src/poller.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/poller.py b/src/poller.py index 07c4d74..bf74367 100644 --- a/src/poller.py +++ b/src/poller.py @@ -96,13 +96,17 @@ def fetch_and_relay_post(post_url: str) -> bool: try: api = Api() - # Fetch the specific post - post = api.pull_status(post_id) - if post: - return process_single_post(post, username) - else: - print(f"Post not found: {post_id}", file=sys.stderr) - return False + # Fetch user's statuses and find the matching post + print(f"Fetching statuses for @{username} to find post {post_id}...") + statuses = list(api.pull_statuses(username, replies=True)) + + for post in statuses: + if str(post.get("id", "")) == post_id: + print(f"Found post {post_id}") + return process_single_post(post, username) + + print(f"Post not found in recent statuses: {post_id}", file=sys.stderr) + return False except Exception as e: print(f"Error fetching post: {e}", file=sys.stderr) return False