1
0
mirror of https://gitlab.com/brutaldon/brutaldon.git synced 2024-12-04 14:46:24 -05:00

Missed a few status_post calls

This commit is contained in:
Cy 2020-05-31 01:04:43 +00:00
parent 12d7b4cb7d
commit c0caab4919
No known key found for this signature in database
GPG Key ID: F66D599380F88521

View File

@ -995,8 +995,8 @@ def redraft(request, id):
"active_user" "active_user"
].source.privacy ].source.privacy
try: try:
try: status_post(
mastodon.status_post( account, request, mastodon,
status=form.cleaned_data["status"], status=form.cleaned_data["status"],
visibility=form.cleaned_data["visibility"], visibility=form.cleaned_data["visibility"],
spoiler_text=form.cleaned_data["spoiler_text"], spoiler_text=form.cleaned_data["spoiler_text"],
@ -1004,14 +1004,6 @@ def redraft(request, id):
in_reply_to_id=toot.in_reply_to_id, in_reply_to_id=toot.in_reply_to_id,
content_type="text/markdown", content_type="text/markdown",
) )
except TypeError:
mastodon.status_post(
status=form.cleaned_data["status"],
visibility=form.cleaned_data["visibility"],
spoiler_text=form.cleaned_data["spoiler_text"],
media_ids=media_objects,
in_reply_to_id=toot.in_reply_to_id,
)
mastodon.status_delete(id) mastodon.status_delete(id)
except MastodonAPIError as error: except MastodonAPIError as error:
form.add_error( form.add_error(
@ -1125,8 +1117,8 @@ def reply(request, id):
) )
) )
try: try:
try: status_post(
mastodon.status_post( account, request, mastodon,
status=form.cleaned_data["status"], status=form.cleaned_data["status"],
visibility=form.cleaned_data["visibility"], visibility=form.cleaned_data["visibility"],
spoiler_text=form.cleaned_data["spoiler_text"], spoiler_text=form.cleaned_data["spoiler_text"],
@ -1134,14 +1126,6 @@ def reply(request, id):
in_reply_to_id=id, in_reply_to_id=id,
content_type="text/markdown", content_type="text/markdown",
) )
except TypeError:
mastodon.status_post(
status=form.cleaned_data["status"],
visibility=form.cleaned_data["visibility"],
spoiler_text=form.cleaned_data["spoiler_text"],
media_ids=media_objects,
in_reply_to_id=id,
)
except MastodonAPIError as error: except MastodonAPIError as error:
form.add_error( form.add_error(
"", "",