diff --git a/outbox.py b/outbox.py index bd16edfb7..986ed6e1d 100644 --- a/outbox.py +++ b/outbox.py @@ -57,6 +57,7 @@ from delete import outbox_delete from shares import outbox_share_upload from shares import outbox_undo_share_upload from webapp_post import individual_post_as_html +from speaker import update_speaker def _person_receive_update_outbox(recent_posts_cache: {}, @@ -400,6 +401,13 @@ def post_message_to_outbox(session, translate: {}, print('WARN: post not saved to outbox ' + outbox_name) return False + update_speaker(base_dir, http_prefix, + post_to_nickname, domain, domain_full, + message_json, person_cache, + translate, message_json['actor'], + theme, system_language, + outbox_name) + # save all instance blogs to the news actor if post_to_nickname != 'news' and outbox_name == 'tlblogs': if '/' in saved_filename: diff --git a/speaker.py b/speaker.py index 6f46506a8..862737b62 100644 --- a/speaker.py +++ b/speaker.py @@ -554,6 +554,8 @@ def update_speaker(base_dir: str, http_prefix: str, post_json_object, person_cache, translate, announcing_actor, theme_name) + if not speaker_json: + return account_dir = acct_dir(base_dir, nickname, domain) speaker_filename = account_dir + '/speaker.json' save_json(speaker_json, speaker_filename)