mirror of https://gitlab.com/bashrc2/epicyon
Tidying
parent
91ed1e83e5
commit
cfe4545a0d
10
posts.py
10
posts.py
|
@ -446,10 +446,8 @@ def _is_public_feed_post(item: {}, person_posts: {}, debug: bool) -> bool:
|
||||||
if debug:
|
if debug:
|
||||||
print('No type')
|
print('No type')
|
||||||
return False
|
return False
|
||||||
if item['type'] != 'Create' and \
|
allowed_post_types = ('Create', 'Announce', 'Page', 'Note')
|
||||||
item['type'] != 'Announce' and \
|
if item['type'] not in allowed_post_types:
|
||||||
item['type'] != 'Page' and \
|
|
||||||
item['type'] != 'Note':
|
|
||||||
if debug:
|
if debug:
|
||||||
print('Not a Create/Note/Announce type')
|
print('Not a Create/Note/Announce type')
|
||||||
return False
|
return False
|
||||||
|
@ -457,12 +455,12 @@ def _is_public_feed_post(item: {}, person_posts: {}, debug: bool) -> bool:
|
||||||
if isinstance(item['object'], dict):
|
if isinstance(item['object'], dict):
|
||||||
if not item['object'].get('published'):
|
if not item['object'].get('published'):
|
||||||
if debug:
|
if debug:
|
||||||
print('No published attribute')
|
print('No published attribute 1')
|
||||||
return False
|
return False
|
||||||
elif isinstance(item['object'], str):
|
elif isinstance(item['object'], str):
|
||||||
if not item.get('published'):
|
if not item.get('published'):
|
||||||
if debug:
|
if debug:
|
||||||
print('No published attribute')
|
print('No published attribute 2')
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
if debug:
|
if debug:
|
||||||
|
|
Loading…
Reference in New Issue