Fix one-off mode to use pull_statuses
All checks were successful
Build and Push Docker Image / build (push) Successful in 1m57s
All checks were successful
Build and Push Docker Image / build (push) Successful in 1m57s
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 <noreply@anthropic.com>
This commit is contained in:
@@ -96,12 +96,16 @@ def fetch_and_relay_post(post_url: str) -> bool:
|
||||
|
||||
try:
|
||||
api = Api()
|
||||
# Fetch the specific post
|
||||
post = api.pull_status(post_id)
|
||||
if post:
|
||||
# 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)
|
||||
else:
|
||||
print(f"Post not found: {post_id}", file=sys.stderr)
|
||||
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user