diff --git a/app.py b/app.py index b858154..6ce2143 100644 --- a/app.py +++ b/app.py @@ -712,7 +712,13 @@ def addAnswer(): if not answer: abort(400, _("Missing 'answer' attribute or 'answer' is empty")) - return func.addAnswer(question_id, answer, cw) + return_val = func.addAnswer(question_id, answer, cw) + + if cfg['crosspost']['fediverse']['enabled']: + fedi_crosspost_thread = threading.Thread(target=func.postOnFediverse, name=f"fediverse crosspost thread for {question_id}", args=(question_id, answer, cw,)) + fedi_crosspost_thread.start() + + return return_val # -- uploaders --