merge-requests/30/head
Bob Mottram 2023-06-18 14:38:53 +01:00
parent 91ed1e83e5
commit cfe4545a0d
1 changed files with 4 additions and 6 deletions

View File

@ -446,10 +446,8 @@ def _is_public_feed_post(item: {}, person_posts: {}, debug: bool) -> bool:
if debug:
print('No type')
return False
if item['type'] != 'Create' and \
item['type'] != 'Announce' and \
item['type'] != 'Page' and \
item['type'] != 'Note':
allowed_post_types = ('Create', 'Announce', 'Page', 'Note')
if item['type'] not in allowed_post_types:
if debug:
print('Not a Create/Note/Announce type')
return False
@ -457,12 +455,12 @@ def _is_public_feed_post(item: {}, person_posts: {}, debug: bool) -> bool:
if isinstance(item['object'], dict):
if not item['object'].get('published'):
if debug:
print('No published attribute')
print('No published attribute 1')
return False
elif isinstance(item['object'], str):
if not item.get('published'):
if debug:
print('No published attribute')
print('No published attribute 2')
return False
else:
if debug: