only mirror original posts

This commit is contained in:
Kay Faraday 2022-07-02 22:53:45 +00:00
parent bdb3b68dfe
commit 0a5a10c18e
1 changed files with 5 additions and 2 deletions

View File

@ -76,8 +76,11 @@ class PostMirror:
print(next(spinner), end='', flush=True)
for item in page['orderedItems']:
post = item['object']
for activity in page['orderedItems']:
if activity['type'] != 'Create':
# it's not a post, but a boost or like or something
continue
post = activity['object']
published_at = pendulum.parse(post['published'])
if published_at < last_mirrored_at:
done = True