mirror of
https://codeberg.org/catask-org/catask.git
synced 2025-04-19 05:13:41 -05:00
start a fedi crosspost thread if fedi crosspost is enabled
This commit is contained in:
parent
d00d987a0c
commit
deef6ce177
1 changed files with 7 additions and 1 deletions
8
app.py
8
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 --
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue