aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mastodon')
-rw-r--r--mastodon/Mastodon.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py
index 460b518..34e6552 100644
--- a/mastodon/Mastodon.py
+++ b/mastodon/Mastodon.py
@@ -162,7 +162,7 @@ class Mastodon:
162 __DICT_VERSION_MEDIA = "2.3.0" 162 __DICT_VERSION_MEDIA = "2.3.0"
163 __DICT_VERSION_ACCOUNT = "2.4.0" 163 __DICT_VERSION_ACCOUNT = "2.4.0"
164 __DICT_VERSION_POLL = "2.8.0" 164 __DICT_VERSION_POLL = "2.8.0"
165 __DICT_VERSION_STATUS = bigger_version(bigger_version(bigger_version(bigger_version(bigger_version("2.8.0", 165 __DICT_VERSION_STATUS = bigger_version(bigger_version(bigger_version(bigger_version(bigger_version("2.8.2",
166 __DICT_VERSION_MEDIA), __DICT_VERSION_ACCOUNT), __DICT_VERSION_APPLICATION), __DICT_VERSION_MENTION), __DICT_VERSION_POLL) 166 __DICT_VERSION_MEDIA), __DICT_VERSION_ACCOUNT), __DICT_VERSION_APPLICATION), __DICT_VERSION_MENTION), __DICT_VERSION_POLL)
167 __DICT_VERSION_INSTANCE = bigger_version("2.7.2", __DICT_VERSION_ACCOUNT) 167 __DICT_VERSION_INSTANCE = bigger_version("2.7.2", __DICT_VERSION_ACCOUNT)
168 __DICT_VERSION_HASHTAG = "2.3.4" 168 __DICT_VERSION_HASHTAG = "2.3.4"
@@ -1452,7 +1452,9 @@ class Mastodon:
1452 status_post returns a `scheduled toot dict`_ instead. 1452 status_post returns a `scheduled toot dict`_ instead.
1453 1453
1454 Pass `poll` to attach a poll to the status. An appropriate object can be 1454 Pass `poll` to attach a poll to the status. An appropriate object can be
1455 constructed using `make_poll()`_ 1455 constructed using `make_poll()`_ . Note that as of Mastodon version
1456 2.8.2, you can only have either media or a poll attached, not both at
1457 the same time.
1456 1458
1457 Specify `content_type` to set the content type of your post on Pleroma. 1459 Specify `content_type` to set the content type of your post on Pleroma.
1458 It accepts 'text/plain' (default), 'text/markdown', and 'text/html'. 1460 It accepts 'text/plain' (default), 'text/markdown', and 'text/html'.
@@ -1468,7 +1470,12 @@ class Mastodon:
1468 scheduled_at = self.__consistent_isoformat_utc(scheduled_at) 1470 scheduled_at = self.__consistent_isoformat_utc(scheduled_at)
1469 1471
1470 params_initial = locals() 1472 params_initial = locals()
1471 1473
1474 # Validate poll/media exclusivity
1475 if not poll is None:
1476 if (not media_ids is None) and len(media_ids) != 0:
1477 raise ValueError('Status can have media or poll attached - not both.')
1478
1472 # Validate visibility parameter 1479 # Validate visibility parameter
1473 valid_visibilities = ['private', 'public', 'unlisted', 'direct'] 1480 valid_visibilities = ['private', 'public', 'unlisted', 'direct']
1474 if params_initial['visibility'] == None: 1481 if params_initial['visibility'] == None:
Powered by cgit v1.2.3 (git 2.41.0)