diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index f55d4bb..dce2081 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py @@ -1144,7 +1144,7 @@ class Mastodon: @api_version("1.0.0", "2.4.3", __DICT_VERSION_STATUS) def status_post(self, status, in_reply_to_id=None, media_ids=None, sensitive=False, visibility=None, spoiler_text=None, - language=None, idempotency_key=None): + language=None, idempotency_key=None, content_type=None): """ Post a status. Can optionally be in reply to another status and contain media. @@ -1182,6 +1182,11 @@ class Mastodon: if you call it with the same `idempotency_key`, only one status will be created. + Specify 'content_type' to set the content type of your post on Pleroma. + It accepts 'text/plain' (default), 'text/markdown', and 'text/html'. + This parameter is not supported on Mastodon servers, but will be + safely ignored if set. + Returns a `toot dict`_ with the new status. """ if in_reply_to_id != None: @@ -1225,6 +1230,9 @@ class Mastodon: params_initial["media_ids"] = media_ids_proper + if params_initial['content_type'] == None: + del params_initial['content_type'] + params = self.__generate_params(params_initial, ['idempotency_key']) return self.__api_request('POST', '/api/v1/statuses', params, headers = headers)