merge-requests/30/head
Bob Mottram 2023-12-09 19:18:14 +00:00
parent 76157e2e1f
commit 4a66feb82e
2 changed files with 3 additions and 7 deletions

View File

@ -140,11 +140,8 @@ def _valid_profile_preview_post(post_json_object: {},
if post_json_object['type'] == 'Create':
if not has_object_dict(post_json_object):
return False, None
if post_json_object['type'] != 'Create' and \
post_json_object['type'] != 'Announce':
if post_json_object['type'] != 'Note' and \
post_json_object['type'] != 'Video' and \
post_json_object['type'] != 'Page':
if post_json_object['type'] not in ('Create', 'Announce'):
if post_json_object['type'] not in ('Note', 'Video', 'Page'):
return False, None
if not post_json_object.get('to'):
return False, None

View File

@ -988,8 +988,7 @@ def html_timeline(default_timeline: str,
# show each post in the timeline
tl_items_str = ''
for item in timeline_json['orderedItems']:
if item['type'] == 'Create' or \
item['type'] == 'Announce':
if item['type'] in ('Create', 'Announce'):
# is the actor who sent this post snoozed?
if is_person_snoozed(base_dir, nickname, domain,
item['actor']):